/* eslint-disable */
/**
/**
 * Created by GYL on 2018/7/25
 */
//查看子事件
import React, { Component } from 'react';
import MyModal from '../../../components/common/MyModal';
import { Collapse, Icon, Select, Input, Tooltip, Form, Row, Col, TreeSelect, Tag, Tree, Divider, message } from 'antd';
import Util from '../../../utils/Util';
import MyIcon from '../../../components/common/MyIcon';
import config from '../../../config';
import PublicService from "../../../services/PublicService";
import moment from 'moment';
import request from '../../../utils/request';
import styles from '../index.less';
import MyTable from "../../../components/common/MyTable";
const IconFont = Icon.createFromIconfontCN({
    scriptUrl: '//at.alicdn.com/t/font_1315525_kt2bd7ytf.js',
});
const FormItem = Form.Item;
const { Panel } = Collapse;
const { Option } = Select;
const { TextArea } = Input;
const { SHOW_CHILD } = TreeSelect;
const { TreeNode } = Tree;
var AllsonArrList = [
    {
        type: 'TextArea',
        paramName: 'subeventsBasicName',
        id: 'subeventsBasicName',
        title: '0/30',
        num: 30,
        key: "subeventsBasicName",
        label: '子级事件名称',
        style: { width: 250 },
        rules: [{ ...config.reg.required }],
        span: 10,
        rows: 1,
        shuoming: styles.zishijianmingcheng,

    },
    {
        type: 'TextArea',
        paramName: 'subeventsBasicWeight',
        id: 'subeventsBasicWeight',
        key: "subeventsBasicWeight",
        label: '子级权重',
        rules: [{ ...config.reg.long3 }],
        span: 6,
        title: '0/4',
        num: 4,
        rows: 1,
        style: { width: 100 },
    },
    {
        type: 'treeSelect',
        paramName: 'responsibleDepartmentId',
        id: 'responsibleDepartmentId',
        title: '0/200',
        num: 200,
        key: "responsibleDepartmentId",
        label: '子级责任部门',
        rules: [{ ...config.reg.required }],
        treeCheckable: false,
        span: 8,
        rows: 1,
        style: { width: 145 },
        shuoming: styles.zizerenbumen,
        treeData: []

    },
    {
        type: 'TextArea',
        paramName: 'subeventsBasicDescribe',
        id: 'subeventsBasicDescribe',
        title: '0/200',
        num: 200,
        key: "subeventsBasicDescribe",
        label: '子级事件说明',
        rules: [{ ...config.reg.required }],
        span: 24,
        rows: 2,
        backgroundColor: '#1aaef517',
        shuoming: styles.zishijianshuoming,
        style: { width: 750 },
    },

    {
        type: 'treeSelect',
        paramName: 'assistanceDepartmentRoles',
        id: 'assistanceDepartmentRoles',
        title: '0/200',
        num: 200,
        key: "assistanceDepartmentRoles",
        label: '子级协助部门',
        rules: [{ ...config.reg.required }],
        treeCheckable: true,
        span: 24,
        rows: 1,
        backgroundColor: '#1aaef517',
        shuoming: styles.zishijianshuoming,
        style: { width: 750 },
        treeData: []

    },
    {
        type: 'treeSelect',
        paramName: 'confirmUserRoleId',
        id: 'confirmUserRoleId',
        title: '0/200',
        num: 200,
        key: "confirmUserRoleId",
        label: '子级确认用户',
        rules: [{ ...config.reg.required }],
        treeCheckable: false,
        span: 10,
        shuoming: styles.zishijianmingcheng,
        backgroundColor: '#1aaef517',
        style: { width: 250 },
        treeData: []

    },
    {
        type: 'select',
        paramName: 'sureWay',
        id: 'sureWay',
        key: "sureWay",
        label: '子级确认方式',
        rules: [{ ...config.reg.required }],
        span: 12,
        placeholder: '请选择',
        style: { width: 100 },
        options: [
            { text: '用户勾选', value: '用户勾选' },
            { text: '上传文档', value: '上传文档' },
        ]
    },
    {
        type: 'TextArea',
        paramName: 'outcomeDocument',
        id: 'outcomeDocument',
        title: '0/200',
        num: 200,
        key: "outcomeDocument",
        label: '子级成果文件',
        rules: [{
            required: true,
            message: '必填'
        }],
        span: 24,
        rows: 2,
        shuoming: styles.zishijianshuoming,
        backgroundColor: '#1aaef517',
        // className:styles.outcomeDocument,
        style: { width: 750 },
    },
    {
        type: 'treeSelect',
        paramName: 'safetyInformationIdList',
        id: 'safetyInformationIdList',
        title: '0/200',
        num: 200,
        key: "safetyInformationIdList",
        label: '安全提示部门',
        rules: [{ ...config.reg.required }],
        rules: [{ ...config.reg.required }],
        treeCheckable: true,
        span: 12,
        rows: 1,
        backgroundColor: '#1aaef517',
        //   shuoming: styles.zishijianshuoming,
        style: { width: 250 },
        shuoming: styles.zishijianmingcheng,
        treeData: []
    },
    {
        type: 'TextArea',
        paramName: 'safetyInformation',
        id: 'safetyInformation',
        title: '0/200',
        num: 200,
        key: "safetyInformation",
        label: '安全防护措施',
        rules: [{ ...config.reg.required }],
        span: 24,
        rows: 2,
        backgroundColor: '#1aaef517',
        shuoming: styles.zishijianshuoming,
        style: { width: 750 },
    },
    {
        type: 'select',
        paramName: 'auditWay',
        id: 'auditWay',
        key: "auditWay",
        label: '子级审核方式',
        shuoming: styles.zishijianmingcheng,
        rules: [{ ...config.reg.required }],
        span: 12,
        placeholder: '请选择',
        options: [
            { text: '不需审核', value: '不需审核' },
            { text: '系统内审核', value: '系统内审核' },
            { text: '系统内抄送', value: '系统内抄送' },
            { text: 'OA审批', value: 'OA审批' },

        ],
        backgroundColor: '#1aaef517',
        style: { width: 250 },
    },


];
class CheckSubEvent extends Component {
    state = {
        solidType: '1',
        tableData: [],
        upDis: true,
        flag: false,
        sonArrList: [
            {
                type: 'TextArea',
                paramName: 'subeventsBasicName',
                id: 'subeventsBasicName',
                title: '0/30',
                num: 30,
                key: "subeventsBasicName",
                label: '子级事件名称',
                style: { width: 250 },
                rules: [{ ...config.reg.required }],
                span: 10,
                rows: 1,
                shuoming: styles.zishijianmingcheng,
                backgroundColor: '#1aaef517',


            },
            {
                type: 'TextArea',
                paramName: 'subeventsBasicWeight',
                id: 'subeventsBasicWeight',
                key: "subeventsBasicWeight",
                label: '子级权重',
                rules: [{ ...config.reg.long3 }],
                span: 6,
                title: '0/4',
                num: 4,
                rows: 1,
                style: { width: 100 },
            },
            {
                type: 'treeSelect',
                paramName: 'responsibleDepartmentId',
                id: 'responsibleDepartmentId',
                title: '0/200',
                num: 200,
                key: "responsibleDepartmentId",
                label: '子级责任部门',
                rules: [{ ...config.reg.required }],
                treeCheckable: false,
                span: 8,
                rows: 1,
                style: { width: 145 },
                shuoming: styles.zizerenbumen,
                treeData: [],
                backgroundColor: '#1aaef517',

            },
            {
                type: 'TextArea',
                paramName: 'subeventsBasicDescribe',
                id: 'subeventsBasicDescribe',
                title: '0/200',
                num: 200,
                key: "subeventsBasicDescribe",
                label: '子级事件说明',
                rules: [{ ...config.reg.required }],
                span: 24,
                rows: 2,
                backgroundColor: '#1aaef517',
                shuoming: styles.zishijianshuoming,
                style: { width: 750 },

            },

            {
                type: 'treeSelect',
                paramName: 'assistanceDepartmentRoles',
                id: 'assistanceDepartmentRoles',
                title: '0/200',
                num: 200,
                key: "assistanceDepartmentRoles",
                label: '子级协助部门',
                rules: [{ ...config.reg.required }],
                treeCheckable: true,
                span: 24,
                rows: 1,
                backgroundColor: '#1aaef517',
                shuoming: styles.zishijianshuoming,
                style: { width: 750 },
                treeData: []

            },
            {
                type: 'treeSelect',
                paramName: 'confirmUserRoleId',
                id: 'confirmUserRoleId',
                title: '0/200',
                num: 200,
                key: "confirmUserRoleId",
                label: '子级确认用户',
                rules: [{ ...config.reg.required }],
                treeCheckable: false,
                span: 10,
                shuoming: styles.zishijianmingcheng,
                backgroundColor: '#1aaef517',
                style: { width: 250 },
                treeData: []

            },
            {
                type: 'select',
                paramName: 'sureWay',
                id: 'sureWay',
                key: "sureWay",
                label: '子级确认方式',
                rules: [{ ...config.reg.required }],
                span: 12,
                placeholder: '请选择',
                style: { width: 100 },
                backgroundColor: '#1aaef517',
                options: [
                    { text: '用户勾选', value: '用户勾选' },
                    { text: '上传文档', value: '上传文档' },
                ]
            },
            {
                type: 'TextArea',
                paramName: 'outcomeDocument',
                id: 'outcomeDocument',
                title: '0/200',
                num: 200,
                key: "outcomeDocument",
                label: '子级成果文件',
                rules: [{
                    required: true,
                    message: '必填'
                }],
                span: 24,
                rows: 2,
                shuoming: styles.zishijianshuoming,
                backgroundColor: '#1aaef517',
                // className:styles.outcomeDocument,
                style: { width: 750 },
            },
            {
                type: 'treeSelect',
                paramName: 'safetyInformationIdList',
                id: 'safetyInformationIdList',
                title: '0/200',
                num: 200,
                key: "safetyInformationIdList",
                label: '安全提示部门',
                rules: [{ ...config.reg.required }],
                rules: [{ ...config.reg.required }],
                treeCheckable: true,
                span: 12,
                rows: 1,
                backgroundColor: '#1aaef517',
                //   shuoming: styles.zishijianshuoming,
                style: { width: 250 },
                shuoming: styles.zishijianmingcheng,
                treeData: []
            },
            {
                type: 'TextArea',
                paramName: 'safetyInformation',
                id: 'safetyInformation',
                title: '0/200',
                num: 200,
                key: "safetyInformation",
                label: '安全防护措施',
                rules: [{ ...config.reg.required }],
                span: 24,
                rows: 2,
                backgroundColor: '#1aaef517',
                shuoming: styles.zishijianshuoming,
                style: { width: 750 },
            },
            {
                type: 'select',
                paramName: 'auditWay',
                id: 'auditWay',
                key: "auditWay",
                label: '子级审核方式',
                shuoming: styles.zishijianmingcheng,
                rules: [{ ...config.reg.required }],
                span: 12,
                placeholder: '请选择',
                options: [
                    { text: '不需审核', value: '不需审核' },
                    { text: '系统内审核', value: '系统内审核' },
                    { text: '系统内抄送', value: '系统内抄送' },
                    { text: 'OA审批', value: 'OA审批' },

                ],
                backgroundColor: '#1aaef517',
                style: { width: 250 },
            },


        ],
        treeArr: [],
        expandedKeys: [],
        autoExpandParent: true,
        treeData: [],
        selectedKeys: [],

    };
    componentDidMount() {
        request({
            url: '/pm-web/projectmanage/role/getTreeData',
            method: 'POST',
            data: { parentId: '', roleLevel: "", notManagementLayer: true }
        }).then(data => {
            console.log(data)
            if (data.rc === 0) {

                this.state.sonArrList[5].treeData = data.ret
                //设置为返回数组第一用户
                // this.props.form.setFieldsValue({ ['confirmUserRoleId']: data.ret[0].value })

                this.setState(
                    {
                        sonArrList: this.state.sonArrList
                    },
                    () => {
                        //给子级确认部门焦点
                        // this.props.form.validateFields(['confirmUserRoleId'], { force: true });
                    },
                );
            }


        })
        //根据事件id获取子级事件树结构
        request({
            url: '/pm-web/projectmanage/subeventsbasicinfo/getTreeByEventBasicId',
            method: 'POST',
            data: { eventBasicId: this.props.eventBasicId }
        }).then(data => {

            if (data.rc === 0) {
                this.setState({
                    treeData: data.ret.treeList,
                    selectedKeys: data.ret.defaultStr,
                    expandedKeys: data.ret.treeId
                })

                //根据id获取详情
                request({
                    url: '/pm-web/projectmanage/subeventsbasicinfo/findOne',
                    method: 'POST',
                    data: { subeventsBasicId: data.ret.defaultStr[0] }
                }).then(data => {
                    console.log(data)
                    if (data.rc === 0) {
                        this.props.form.resetFields();//重置from表单所有值

                        var sonArrListTwo = [
                            {
                                type: 'TextArea',
                                paramName: 'subeventsBasicName',
                                id: 'subeventsBasicName',
                                title: '0/30',
                                num: 30,
                                key: "subeventsBasicName",
                                label: '子级事件名称',
                                style: { width: 250 },
                                rules: [{ ...config.reg.required }],
                                span: 10,
                                rows: 1,
                                shuoming: styles.zishijianmingcheng,
                                initialValue: data.ret.object.subeventsBasicName

                            },
                            {
                                type: 'TextArea',
                                paramName: 'subeventsBasicWeight',
                                id: 'subeventsBasicWeight',
                                key: "subeventsBasicWeight",
                                label: '子级权重',
                                rules: [{ ...config.reg.long3 }],
                                span: 6,
                                title: '0/4',
                                num: 4,
                                rows: 1,
                                style: { width: 100 },
                                initialValue: data.ret.object.subeventsBasicWeight
                            },
                            {
                                type: 'treeSelect',
                                paramName: 'responsibleDepartmentId',
                                id: 'responsibleDepartmentId',
                                title: '0/200',
                                num: 200,
                                key: "responsibleDepartmentId",
                                label: '子级责任部门',
                                rules: [{ ...config.reg.required }],
                                treeCheckable: false,
                                span: 8,
                                rows: 1,
                                style: { width: 145 },
                                shuoming: styles.zizerenbumen,
                                initialValue: data.ret.object.responsibleDepartmentId,
                                treeData: this.state.treeData2,


                            },
                            {
                                type: 'TextArea',
                                paramName: 'subeventsBasicDescribe',
                                id: 'subeventsBasicDescribe',
                                title: '0/200',
                                num: 200,
                                key: "subeventsBasicDescribe",
                                label: '子级事件说明',
                                rules: [{ ...config.reg.required }],
                                span: 24,
                                rows: 2,
                                backgroundColor: '#1aaef517',
                                shuoming: styles.zishijianshuoming,
                                style: { width: 750 },
                                initialValue: data.ret.object.subeventsBasicDescribe
                            },

                            {
                                type: 'treeSelect',
                                paramName: 'assistanceDepartmentRoles',
                                id: 'assistanceDepartmentRoles',
                                title: '0/200',
                                num: 200,
                                key: "assistanceDepartmentRoles",
                                label: '子级协助部门',
                                rules: [{ ...config.reg.required }],
                                treeCheckable: true,
                                span: 24,
                                rows: 1,
                                backgroundColor: '#1aaef517',
                                shuoming: styles.zishijianshuoming,
                                style: { width: 750 },
                                initialValue: data.ret.object.assistanceDepartmentRoleIdList,
                                treeData: this.state.treeData1,

                            },
                            {
                                type: 'treeSelect',
                                paramName: 'confirmUserRoleId',
                                id: 'confirmUserRoleId',
                                title: '0/200',
                                num: 200,
                                key: "confirmUserRoleId",
                                label: '子级确认用户',
                                rules: [{ ...config.reg.required }],
                                treeCheckable: false,
                                span: 10,
                                shuoming: styles.zishijianmingcheng,
                                backgroundColor: '#1aaef517',
                                style: { width: 250 },
                                initialValue: data.ret.object.confirmUserRoleId,
                                treeData: this.state.treeData1,

                            },
                            {
                                type: 'select',
                                paramName: 'sureWay',
                                id: 'sureWay',
                                key: "sureWay",
                                label: '子级确认方式',
                                rules: [{ ...config.reg.required }],
                                span: 12,
                                placeholder: '请选择',
                                initialValue: data.ret.object.sureWay == 1 ? '用户勾选' : '上传文档',
                                options: [
                                    { text: '用户勾选', value: '用户勾选' },
                                    { text: '上传文档', value: '上传文档' },
                                ],
                                style: { width: 100 },

                            },
                            {
                                type: 'TextArea',
                                paramName: 'outcomeDocument',
                                id: 'outcomeDocument',
                                title: '0/200',
                                num: 200,
                                key: "outcomeDocument",
                                label: '子级成果文件',
                                rules: [{
                                    required: true,
                                    message: '必填'
                                }],
                                span: 24,
                                rows: 2,
                                shuoming: styles.zishijianshuoming,
                                initialValue: data.ret.object.outcomeDocument,
                                style: { width: 750 },
                            },
                            {
                                type: 'treeSelect',
                                paramName: 'safetyInformationIdList',
                                id: 'safetyInformationIdList',
                                title: '0/200',
                                num: 200,
                                key: "safetyInformationIdList",
                                label: '安全提示部门',
                                rules: [{ ...config.reg.required }],
                                rules: [{ ...config.reg.required }],
                                treeCheckable: true,
                                span: 12,
                                rows: 1,
                                backgroundColor: '#1aaef517',
                                //   shuoming: styles.zishijianshuoming,
                                style: { width: 250 },
                                shuoming: styles.zishijianmingcheng,
                                initialValue: data.ret.object.safetyInformationIdList,
                                treeData: this.state.getTreeDataAn
                            },
                            {
                                type: 'TextArea',
                                paramName: 'safetyInformation',
                                id: 'safetyInformation',
                                title: '0/200',
                                num: 200,
                                key: "safetyInformation",
                                label: '安全防护措施',
                                rules: [{ ...config.reg.required }],
                                span: 24,
                                rows: 2,
                                backgroundColor: '#1aaef517',
                                shuoming: styles.zishijianshuoming,
                                initialValue: data.ret.object.safetyInformation,
                                style: { width: 750 },
                            },

                        ]

                        //上方sonArrList 为基础子级事件模板,下方判断为根据编辑内容显示不同的定制模板

                        //说明用户选择上传文档,则会有三种不同的情况看下
                        if (data.ret.object.auditWay == 2) {
                            //说明为系统内审核
                            console.log(data.ret.object)
                            sonArrListTwo.push(
                                {
                                    type: 'select',
                                    paramName: 'auditWay',
                                    id: 'auditWay',
                                    key: "auditWay",
                                    label: '子级审核方式',
                                    rules: [{ ...config.reg.required }],
                                    span: 12,
                                    shuoming: styles.zishijianmingcheng,
                                    placeholder: '请选择',
                                    initialValue: '系统内审核',
                                    options: [
                                        { text: '不需审核', value: '不需审核' },
                                        { text: '系统内审核', value: '系统内审核' },
                                        { text: '系统内抄送', value: '系统内抄送' },
                                        { text: 'OA审批', value: 'OA审批' },

                                    ],
                                    style: { width: 250 },
                                },
                                {
                                    type: 'treeSelect',
                                    paramName: 'eventAuditRoleList',
                                    id: 'eventAuditRoleList',
                                    title: '0/200',
                                    num: 200,
                                    key: "eventAuditRoleList",
                                    label: '子级审核用户',
                                    rules: [{ ...config.reg.required }],
                                    treeCheckable: true,
                                    span: 24,
                                    // rows: 1,
                                    // colSpan: 24,
                                    initialValue: data.ret.object.eventAuditRoleIdList,
                                    shuoming: styles.zishijianshuoming,
                                    style: { width: 750 },
                                    treeData: this.state.treeData1,
                                },
                                {
                                    type: 'treeSelect',
                                    paramName: 'eventAuditCCRoleList',
                                    id: 'eventAuditCCRoleList',
                                    title: '0/200',
                                    num: 200,
                                    key: "eventAuditCCRoleList",
                                    label: '子级抄送用户',
                                    rules: [{ ...config.reg.required }],
                                    treeCheckable: true,
                                    span: 24,
                                    shuoming: styles.zishijianshuoming,
                                    initialValue: data.ret.object.eventAuditCCRoleIdList,
                                    style: { width: 750 },
                                    treeData: this.state.treeData1,
                                }
                            )

                        } else if (data.ret.object.auditWay == 3) {
                            //系统内抄送
                            sonArrListTwo.push(
                                {
                                    type: 'select',
                                    paramName: 'auditWay',
                                    id: 'auditWay',
                                    key: "auditWay",
                                    label: '子级审核方式',
                                    shuoming: styles.zishijianmingcheng,
                                    rules: [{ ...config.reg.required }],
                                    span: 12,
                                    placeholder: '请选择',
                                    initialValue: '系统内抄送',
                                    style: { width: 250 },
                                    options: [
                                        { text: '不需审核', value: '不需审核' },
                                        { text: '系统内审核', value: '系统内审核' },
                                        { text: '系统内抄送', value: '系统内抄送' },
                                        { text: 'OA审批', value: 'OA审批' },
                                    ]
                                },
                                {
                                    type: 'treeSelect',
                                    paramName: 'eventAuditCCRoleList',
                                    id: 'eventAuditCCRoleList',
                                    title: '0/200',
                                    num: 200,
                                    key: "eventAuditCCRoleList",
                                    label: '子级抄送用户',
                                    rules: [{ ...config.reg.required }],
                                    treeCheckable: true,
                                    span: 24,
                                    // shuoming: styles.zishijianshuoming,
                                    // className: styles.outcomeDocument,
                                    initialValue: data.ret.object.eventAuditCCRoleIdList,
                                    treeData: this.state.treeData1,
                                    style: { width: 750 },
                                }
                            )
                        } else if (data.ret.object.auditWay == 4) {
                            //OA审批
                            sonArrListTwo.push(
                                {
                                    type: 'select',
                                    paramName: 'auditWay',
                                    id: 'auditWay',
                                    key: "auditWay",
                                    label: '子级审核方式',
                                    rules: [{ ...config.reg.required }],
                                    span: 12,
                                    shuoming: styles.zishijianmingcheng,
                                    style: { width: 250 },
                                    placeholder: '请选择',
                                    initialValue: 'OA审批',
                                    options: [
                                        { text: '不需审核', value: '不需审核' },
                                        { text: '系统内审核', value: '系统内审核' },
                                        { text: '系统内抄送', value: '系统内抄送' },
                                        { text: 'OA审批', value: 'OA审批' },
                                    ]
                                },
                                // {
                                //     type: 'select',
                                //     paramName: 'oaProcess',
                                //     id: 'oaProcess',
                                //     key: "oaProcess",
                                //     label: 'OA审批流',
                                //     rules: [{ ...config.reg.required }],
                                //     initialValue: data.ret.object.oaProcess,
                                //     span: 12,
                                //     style: { width: 250 },
                                //     placeholder: '请选择',
                                //     options: [
                                //         { text: '1', value: '1' },
                                //     ]
                                // },
                            )
                        } else if (data.ret.object.auditWay == 1) {
                            sonArrListTwo.push(
                                {
                                    type: 'select',
                                    paramName: 'auditWay',
                                    id: 'auditWay',
                                    key: "auditWay",
                                    label: '子级审核方式',
                                    rules: [{ ...config.reg.required }],
                                    shuoming: styles.zishijianmingcheng,
                                    span: 12,
                                    placeholder: '请选择',
                                    initialValue: '不需审核',
                                    options: [
                                        { text: '不需审核', value: '不需审核' },
                                        { text: '系统内审核', value: '系统内审核' },
                                        { text: '系统内抄送', value: '系统内抄送' },
                                        { text: 'OA审批', value: 'OA审批' },

                                    ],
                                    style: { width: 250 },
                                },
                            )
                        }


                        this.setState({
                            shanChu: data.ret.shanChu,
                            shangYi: data.ret.shangYi,
                            xiaYi: data.ret.xiaYi,
                            xinZengTongJi: data.ret.xinZengTongJi,
                            xinZengXiaJi: data.ret.xinZengXiaJi,
                            parentEventId: data.ret.object.parentEventId,
                            hierarchy: data.ret.object.hierarchy,
                            eventBasicId: this.props.eventBasicId,
                            subeventsBasicId: data.ret.object.subeventsBasicId,
                            insertOrUpdate: data.ret.insertOrUpdate,//1新增2编辑

                            sonArrList: sonArrListTwo

                        })
                    }
                })

            }
        })


        //查询子级责任部门

        request({
            url: '/pm-web/projectmanage/role/getTreeData',
            method: 'POST',
            data: { parentId: "", roleLevel: 1, notManagementLayer: true }
        }).then(data => {
            this.state.sonArrList[2].treeData = data.ret

            AllsonArrList[2].treeData = data.ret
            this.setState({
                sonArrList: this.state.sonArrList,
                treeData2: data.ret
            })

        })


        let params = {}
        request({
            url: '/pm-web/projectmanage/role/getTreeData',
            method: 'POST',
            data: { notManagementLayer: true }
        }).then(data => {
            this.state.sonArrList[4].treeData = data.ret
            this.state.sonArrList[5].treeData = data.ret
            AllsonArrList[4].treeData = data.ret
            AllsonArrList[5].treeData = data.ret
            this.setState({
                sonArrList: this.state.sonArrList,
                treeData1: data.ret,
                treeArr: data.ret
            })

        })

        //获取安全提示部门选择下拉树
        request({
            url: '/pm-web/projectmanage/role/getTreeData',
            method: 'POST',
            data: { notManagementLayer: true }
        }).then(data => {
            AllsonArrList[8].treeData = data.ret
            this.state.sonArrList[8].treeData = data.ret
            this.setState({
                sonArrList: this.state.sonArrList,
                getTreeDataAn: data.ret,
            })
        })



    };
    // modal保存
    onModalSave = () => {
        console.log(this.state.insertOrUpdate)

        //根据this.state.insertOrUpdate 区分新增或编辑 1新增 2编辑



        this.props.form.validateFieldsAndScroll((err, v) => {
            if (!err) {
                //新增保存
                v.assistanceDepartmentRoleIdList = v.assistanceDepartmentRoles
                v.eventAuditRoleIdList = v.eventAuditRoleList
                v.eventAuditCCRoleIdList = v.eventAuditCCRoleList
                v.assistanceDepartmentRoles = []
                v.eventAuditCCRoleList = []
                v.eventAuditRoleList = []

                v.parentEventId = this.state.parentEventId
                v.hierarchy = this.state.hierarchy
                v.eventBasicId = this.props.eventBasicId
                v.subeventsBasicId = this.state.subeventsBasicId


                v.sureWay = v.sureWay === '用户勾选' ? 1 : 2
                v.auditWay = v.auditWay === '不需审核' ? 1 : v.auditWay === '系统内审核' ? 2 : v.auditWay === '系统内抄送' ? 3 : 4
                v.subeventsBasicWeight = Number(v.subeventsBasicWeight)

                if (this.state.insertOrUpdate == 1) {
                    request({
                        url: '/pm-web/projectmanage/subeventsbasicinfo/insertSubeventsBasicInfo',
                        method: 'POST',
                        data: v
                    }).then(data => {
                        console.log(data)
                        if (data.rc === 0) {
                            message.success("新增成功!")
                            this.getTreeId()
                        }
                    })
                } else {
                    request({
                        url: '/pm-web/projectmanage/subeventsbasicinfo/updateSubeventsBasicInfo',
                        method: 'POST',
                        data: v
                    }).then(data => {
                        console.log(data)
                        if (data.rc === 0) {
                            message.success("修改成功!")
                            this.getTreeId()
                        }
                    })
                }

            }
        });
    };
    //根据id查询详细信息并且重新获取事件树
    getTreeId = () => {
        //根据事件id获取子级事件树结构
        request({
            url: '/pm-web/projectmanage/subeventsbasicinfo/getTreeByEventBasicId',
            method: 'POST',
            data: { eventBasicId: this.props.eventBasicId }
        }).then(data => {

            if (data.rc === 0) {
                this.setState({
                    treeData: data.ret.treeList,
                    selectedKeys: this.state.selectedKeys,
                    expandedKeys: data.ret.treeId
                })

                //根据id获取详情
                request({
                    url: '/pm-web/projectmanage/subeventsbasicinfo/findOne',
                    method: 'POST',
                    data: { subeventsBasicId: this.state.selectedKeys[0] }
                }).then(data => {
                    console.log(data)
                    if (data.rc === 0) {
                        this.setState({
                            shanChu: data.ret.shanChu,
                            shangYi: data.ret.shangYi,
                            xiaYi: data.ret.xiaYi,
                            xinZengTongJi: data.ret.xinZengTongJi,
                            xinZengXiaJi: data.ret.xinZengXiaJi,
                            // parentEventId: data.ret.object.parentEventId,
                            // hierarchy: data.ret.object.hierarchy,
                            // eventBasicId: this.props.eventBasicId,
                            // subeventsBasicId: data.ret.object.subeventsBasicId,
                            insertOrUpdate: data.ret.insertOrUpdate,//1新增2编辑
                        })
                    }
                })

            }
        })
    }
    // 筛选条件组件change事件
    getChangeValue(value, bzArr, e) {


        let t = this;
        let params = {};
        params[value] = e.target.value;
        t.setState({ params });
    }
    onCheckbox(value, e) {
        let t = this;
        let params = {};
        params[value] = e.target.value;
        t.setState({ params });
    }
    //计算文本域内数字个数
    onChangeNum = (v) => {
        var strs = getByteLen(v);
        function getByteLen(val) {
            strs = val.replace(/[\ |\~|\`|\!|\@|\#|\$|\%|\^|\&|\*|\(|\)|\-|\_|\+|\=|\||\\|\[|\]|\{|\}|\;|\:|\"|\'|\,|\<|\.|\>|\/|\?|\，|\。|\？|\：|\；|\‘|\’|\”|\“|\、|\·|\！|\（|\）|\》|\《|\『|\』]/g, "");
            return strs;
        }
        return strs.length

    }

    //子级事件区域
    getChangeValueSon = (value, e) => {
        console.log(value, e.target.value)
        let t = this;
        let params = {};
        params[value] = e.target.value;
        t.setState({ params });
        //form表单赋值-----改变文本域数字个数
        this.props.form.setFieldsValue({ [value]: e.target.value })
        this.addChangeSon(value, this.onChangeNum(e.target.value))
    }
    addChangeSon = (v, num) => {
        this.state.sonArrList.forEach(item => {
            if (item.paramName === v) {
                item.title = `${num}/${item.num}`
            }
        });
    }
    selectedChange(fun, nextParams, paramName, value) {
        console.log(fun, nextParams, paramName, value)
        //当选择了子级责任部门后,随之改变确认用户
        if (paramName === 'responsibleDepartmentId') {

        }


        if (value === '系统内审核') {


            this.state.sonArrList.push(
                {
                    type: 'treeSelect',
                    paramName: 'eventAuditRoleList',
                    id: 'eventAuditRoleList',
                    title: '0/200',
                    num: 200,
                    key: "eventAuditRoleList",
                    label: '子级审核用户',
                    rules: [{ ...config.reg.required }],
                    treeCheckable: true,
                    span: 24,
                    // rows: 1,
                    // colSpan: 24,
                    shuoming: styles.zishijianshuoming,
                    style: { width: 750 },
                    treeData: this.state.treeArr

                },
                {
                    type: 'treeSelect',
                    paramName: 'eventAuditCCRoleList',
                    id: 'eventAuditCCRoleList',
                    title: '0/200',
                    num: 200,
                    key: "eventAuditCCRoleList",
                    label: '子级抄送用户',
                    rules: [{ ...config.reg.required }],
                    treeCheckable: true,
                    span: 24,
                    shuoming: styles.zishijianshuoming,
                    // className: styles.outcomeDocument,
                    // rows: 1,
                    // colSpan: 24,
                    style: { width: 750 },
                    treeData: this.state.treeArr


                })
            this.state.sonArrList.forEach((item, index) => {
                if (item.label === 'OA审批流') {
                    this.state.sonArrList.splice(index, 1)
                }
                if (item.label === '子级抄送用户') {
                    if (item.rules) {
                        this.state.sonArrList.splice(index, 1)
                    }
                }
            });
            this.setState({
                sonArrList: this.state.sonArrList
            })
        }

        if (value === '系统内抄送') {
            this.state.sonArrList.forEach((item, index) => {

                if (item.label == '子级审核用户') {
                    this.state.sonArrList.splice(index, 2)
                }

                if (item.label == 'OA审批流') {
                    this.state.sonArrList.splice(index, 1)
                }


            });


            setTimeout(() => {
                this.state.sonArrList.push(
                    {
                        type: 'treeSelect',
                        paramName: 'eventAuditCCRoleList',
                        id: 'eventAuditCCRoleList',
                        title: '0/200',
                        num: 200,
                        key: "eventAuditCCRoleList",
                        label: '子级抄送用户',
                        rules: [{ ...config.reg.required }],
                        treeCheckable: true,
                        span: 24,
                        shuoming: styles.zishijianshuoming,
                        // className:styles.outcomeDocument,
                        // rows: 1,
                        // colSpan: 24,
                        style: { width: 750 },
                        treeData: this.state.treeArr


                    })
                console.log(this.state.sonArrList)
                this.setState({
                    sonArrList: this.state.sonArrList
                })
            }, 200)

        }

        if (value === 'OA审批') {
            this.state.sonArrList.forEach((item, index) => {

                if (item.label == '子级审核用户') {
                    this.state.sonArrList.splice(index, 2)
                }

                if (item.label == '子级抄送用户') {
                    this.state.sonArrList.splice(index, 1)
                }

            });

        }


        let t = this;
        let params = {};
        params[paramName] = value;
        if (paramName) {
            t.setState({ params }, () => {
            });
        }
        if (typeof fun === "function") {
            fun(value);
            if (nextParams)
                t.props.form.setFieldsValue({
                    [nextParams]: ''
                })
        }
    }



    onExpand = expandedKeys => {
        console.log('onExpand', expandedKeys);
        // if not set autoExpandParent to false, if children expanded, parent can not collapse.
        // or, you can remove all expanded children keys.
        this.setState({
            expandedKeys,
            autoExpandParent: false,
        });
    };

    onCheck = checkedKeys => {
        console.log('onCheck', checkedKeys);
        this.setState({ checkedKeys });
    };

    onSelect = (selectedKeys, info) => {
        console.log('onSelect', selectedKeys);
        if (selectedKeys.length < 1) {
            return
        }
        this.setState({ selectedKeys });
        //根据id获取详情
        request({
            url: '/pm-web/projectmanage/subeventsbasicinfo/findOne',
            method: 'POST',
            data: { subeventsBasicId: selectedKeys[0] }
        }).then(data => {
            if (data.rc === 0) {
                this.props.form.resetFields();//重置from表单所有值

                var sonArrListTwo = [
                    {
                        type: 'TextArea',
                        paramName: 'subeventsBasicName',
                        id: 'subeventsBasicName',
                        title: '0/30',
                        num: 30,
                        key: "subeventsBasicName",
                        label: '子级事件名称',
                        style: { width: 250 },
                        rules: [{ ...config.reg.required }],
                        span: 10,
                        rows: 1,
                        shuoming: styles.zishijianmingcheng,

                        initialValue: data.ret.object.subeventsBasicName

                    },
                    {
                        type: 'TextArea',
                        paramName: 'subeventsBasicWeight',
                        id: 'subeventsBasicWeight',
                        key: "subeventsBasicWeight",
                        label: '子级权重',
                        rules: [{ ...config.reg.long3 }],
                        span: 6,
                        title: '0/4',
                        num: 4,
                        rows: 1,
                        style: { width: 100 },
                        initialValue: data.ret.object.subeventsBasicWeight
                    },
                    {
                        type: 'treeSelect',
                        paramName: 'responsibleDepartmentId',
                        id: 'responsibleDepartmentId',
                        title: '0/200',
                        num: 200,
                        key: "responsibleDepartmentId",
                        label: '子级责任部门',
                        rules: [{ ...config.reg.required }],
                        treeCheckable: false,
                        span: 8,
                        rows: 1,
                        style: { width: 145 },
                        shuoming: styles.zizerenbumen,
                        initialValue: data.ret.object.responsibleDepartmentId,
                        treeData: this.state.treeData2,


                    },


                    {
                        type: 'TextArea',
                        paramName: 'subeventsBasicDescribe',
                        id: 'subeventsBasicDescribe',
                        title: '0/200',
                        num: 200,
                        key: "subeventsBasicDescribe",
                        label: '子级事件说明',
                        rules: [{ ...config.reg.required }],
                        span: 24,
                        rows: 2,
                        backgroundColor: '#1aaef517',
                        shuoming: styles.zishijianshuoming,
                        style: { width: 750 },
                        initialValue: data.ret.object.subeventsBasicDescribe
                    },

                    {
                        type: 'treeSelect',
                        paramName: 'assistanceDepartmentRoles',
                        id: 'assistanceDepartmentRoles',
                        title: '0/200',
                        num: 200,
                        key: "assistanceDepartmentRoles",
                        label: '子级协助部门',
                        rules: [{ ...config.reg.required }],
                        treeCheckable: true,
                        span: 24,
                        rows: 1,
                        backgroundColor: '#1aaef517',
                        shuoming: styles.zishijianshuoming,
                        style: { width: 750 },
                        initialValue: data.ret.object.assistanceDepartmentRoleIdList,
                        treeData: this.state.treeData1,

                    },
                    {
                        type: 'treeSelect',
                        paramName: 'confirmUserRoleId',
                        id: 'confirmUserRoleId',
                        title: '0/200',
                        num: 200,
                        key: "confirmUserRoleId",
                        label: '子级确认用户',
                        rules: [{ ...config.reg.required }],
                        treeCheckable: false,
                        span: 10,
                        shuoming: styles.zishijianmingcheng,
                        style: { width: 250 },
                        initialValue: data.ret.object.confirmUserRoleId,
                        treeData: this.state.treeData1,

                    },
                    {
                        type: 'select',
                        paramName: 'sureWay',
                        id: 'sureWay',
                        key: "sureWay",
                        label: '子级确认方式',
                        rules: [{ ...config.reg.required }],
                        span: 12,
                        placeholder: '请选择',
                        initialValue: data.ret.object.sureWay == 2 ? '上传文档' : '用户勾选',
                        options: [
                            { text: '用户勾选', value: '用户勾选' },
                            { text: '上传文档', value: '上传文档' },
                        ],
                        style: { width: 100 },

                    },
                    {
                        type: 'TextArea',
                        paramName: 'outcomeDocument',
                        id: 'outcomeDocument',
                        title: '0/200',
                        num: 200,
                        key: "outcomeDocument",
                        label: '子级成果文件',
                        rules: [{
                            required: true,
                            message: '必填'
                        }],
                        span: 24,
                        rows: 2,
                        shuoming: styles.zishijianshuoming,
                        // className:styles.outcomeDocument,
                        initialValue: data.ret.object.outcomeDocument,
                        style: { width: 750 },
                    },
                    {
                        type: 'treeSelect',
                        paramName: 'safetyInformationIdList',
                        id: 'safetyInformationIdList',
                        title: '0/200',
                        num: 200,
                        key: "safetyInformationIdList",
                        label: '安全提示部门',
                        rules: [{ ...config.reg.required }],
                        rules: [{ ...config.reg.required }],
                        treeCheckable: true,
                        span: 12,
                        rows: 1,
                        backgroundColor: '#1aaef517',
                        //   shuoming: styles.zishijianshuoming,
                        style: { width: 250 },
                        shuoming: styles.zishijianmingcheng,
                        initialValue: data.ret.object.safetyInformationIdList,
                        treeData: this.state.getTreeDataAn
                    },
                    {
                        type: 'TextArea',
                        paramName: 'safetyInformation',
                        id: 'safetyInformation',
                        title: '0/200',
                        num: 200,
                        key: "safetyInformation",
                        label: '安全防护措施',
                        rules: [{ ...config.reg.required }],
                        span: 24,
                        rows: 2,
                        backgroundColor: '#1aaef517',
                        shuoming: styles.zishijianshuoming,
                        initialValue: data.ret.object.safetyInformation,
                        style: { width: 750 },
                    },

                ]
                if (data.ret.object.hierarchy != 1) {
                    sonArrListTwo[1].styleLable = { display: 'none' }
                } else {
                    sonArrListTwo[1].styleLable = null
                }

                //上方sonArrList 为基础子级事件模板,下方判断为根据编辑内容显示不同的定制模板

                //说明用户选择上传文档,则会有三种不同的情况看下
                if (data.ret.object.auditWay == 2) {
                    //说明为系统内审核
                    console.log(data.ret.object)
                    sonArrListTwo.push(
                        {
                            type: 'select',
                            paramName: 'auditWay',
                            id: 'auditWay',
                            key: "auditWay",
                            label: '子级审核方式',
                            shuoming: styles.zishijianmingcheng,
                            rules: [{ ...config.reg.required }],
                            span: 12,
                            placeholder: '请选择',
                            initialValue: '系统内审核',
                            options: [
                                { text: '不需审核', value: '不需审核' },
                                { text: '系统内审核', value: '系统内审核' },
                                { text: '系统内抄送', value: '系统内抄送' },
                                { text: 'OA审批', value: 'OA审批' },

                            ],
                            style: { width: 250 },
                        },
                        {
                            type: 'treeSelect',
                            paramName: 'eventAuditRoleList',
                            id: 'eventAuditRoleList',
                            title: '0/200',
                            num: 200,
                            key: "eventAuditRoleList",
                            label: '子级审核用户',
                            rules: [{ ...config.reg.required }],
                            treeCheckable: true,
                            span: 24,
                            // rows: 1,
                            // colSpan: 24,
                            initialValue: data.ret.object.eventAuditRoleIdList,
                            style: { width: 750 },
                            shuoming: styles.zishijianshuoming,
                            treeData: this.state.treeData1,
                        },
                        {
                            type: 'treeSelect',
                            paramName: 'eventAuditCCRoleList',
                            id: 'eventAuditCCRoleList',
                            title: '0/200',
                            num: 200,
                            key: "eventAuditCCRoleList",
                            label: '子级抄送用户',
                            rules: [{ ...config.reg.required }],
                            treeCheckable: true,
                            span: 24,
                            // rows: 1,
                            // colSpan: 24,
                            shuoming: styles.zishijianshuoming,
                            // className: styles.outcomeDocument,
                            initialValue: data.ret.object.eventAuditCCRoleIdList,
                            style: { width: 750 },
                            treeData: this.state.treeData1,
                        }
                    )

                } else if (data.ret.object.auditWay == 3) {
                    //系统内抄送
                    sonArrListTwo.push(
                        {
                            type: 'select',
                            paramName: 'auditWay',
                            id: 'auditWay',
                            key: "auditWay",
                            label: '子级审核方式',
                            shuoming: styles.zishijianmingcheng,
                            rules: [{ ...config.reg.required }],
                            span: 12,
                            placeholder: '请选择',
                            initialValue: '系统内抄送',
                            style: { width: 250 },
                            options: [
                                { text: '不需审核', value: '不需审核' },
                                { text: '系统内审核', value: '系统内审核' },
                                { text: '系统内抄送', value: '系统内抄送' },
                                { text: 'OA审批', value: 'OA审批' },

                            ]
                        },
                        {
                            type: 'treeSelect',
                            paramName: 'eventAuditCCRoleList',
                            id: 'eventAuditCCRoleList',
                            title: '0/200',
                            num: 200,
                            key: "eventAuditCCRoleList",
                            label: '子级抄送用户',
                            rules: [{ ...config.reg.required }],
                            treeCheckable: true,
                            span: 24,
                            // rows: 1,
                            // colSpan: 24,
                            // shuoming: styles.zishijianshuoming,
                            // className: styles.outcomeDocument,
                            style: { width: 750 },
                            initialValue: data.ret.object.eventAuditCCRoleIdList,
                            treeData: this.state.treeData1,
                        }
                    )
                } else if (data.ret.object.auditWay == 4) {
                    //OA审批
                    sonArrListTwo.push(
                        {
                            type: 'select',
                            paramName: 'auditWay',
                            id: 'auditWay',
                            key: "auditWay",
                            label: '子级审核方式',
                            shuoming: styles.zishijianmingcheng,
                            rules: [{ ...config.reg.required }],
                            span: 12,
                            style: { width: 250 },
                            placeholder: '请选择',
                            initialValue: 'OA审批',
                            options: [
                                { text: '不需审核', value: '不需审核' },
                                { text: '系统内审核', value: '系统内审核' },
                                { text: '系统内抄送', value: '系统内抄送' },
                                { text: 'OA审批', value: 'OA审批' },

                            ]
                        },
                        // {
                        //     type: 'select',
                        //     paramName: 'oaProcess',
                        //     id: 'oaProcess',
                        //     key: "oaProcess",
                        //     label: 'OA审批流',
                        //     rules: [{ ...config.reg.required }],
                        //     initialValue: data.ret.object.oaProcess,
                        //     span: 12,
                        //     style: { width: 250 },
                        //     placeholder: '请选择',
                        //     options: [
                        //         { text: '1', value: '1' },
                        //     ]
                        // },
                    )
                } else if (data.ret.object.auditWay == 1) {
                    sonArrListTwo.push(
                        {
                            type: 'select',
                            paramName: 'auditWay',
                            id: 'auditWay',
                            key: "auditWay",
                            label: '子级审核方式',
                            shuoming: styles.zishijianmingcheng,
                            rules: [{ ...config.reg.required }],
                            span: 12,
                            style: { width: 250 },
                            placeholder: '请选择',
                            initialValue: '不需审核',
                            options: [
                                { text: '不需审核', value: '不需审核' },
                                { text: '系统内审核', value: '系统内审核' },
                                { text: '系统内抄送', value: '系统内抄送' },
                                { text: 'OA审批', value: 'OA审批' },

                            ]
                        },
                    )
                }

                this.setState({
                    shanChu: data.ret.shanChu,
                    shangYi: data.ret.shangYi,
                    xiaYi: data.ret.xiaYi,
                    xinZengTongJi: data.ret.xinZengTongJi,
                    xinZengXiaJi: data.ret.xinZengXiaJi,
                    parentEventId: data.ret.object.parentEventId,
                    hierarchy: data.ret.object.hierarchy,
                    eventBasicId: this.props.eventBasicId,
                    subeventsBasicId: data.ret.object.subeventsBasicId,
                    insertOrUpdate: data.ret.insertOrUpdate,//1新增2编辑

                    sonArrList: sonArrListTwo

                })
            }
        })

    };

    renderTreeNodes = data =>
        data.map(item => {
            if (item.children) {
                return (
                    <TreeNode title={item.title} key={item.key} dataRef={item}>
                        {this.renderTreeNodes(item.children)}
                    </TreeNode>
                );
            }
            return <TreeNode key={item.key} {...item} />;
        });
    //添加下级子级事件
    ontianjiaZi = () => {
        AllsonArrList = [
            {
                type: 'TextArea',
                paramName: 'subeventsBasicName',
                id: 'subeventsBasicName',
                title: '0/30',
                num: 30,
                key: "subeventsBasicName",
                label: '子级事件名称',
                style: { width: 250 },
                rules: [{ ...config.reg.required }],
                span: 10,
                rows: 1,
                shuoming: styles.zishijianmingcheng,

            },
            {
                type: 'TextArea',
                paramName: 'subeventsBasicWeight',
                id: 'subeventsBasicWeight',
                key: "subeventsBasicWeight",
                label: '子级权重',
                rules: [{ ...config.reg.long3 }],
                span: 6,
                title: '0/4',
                num: 4,
                rows: 1,
                style: { width: 100 },
            },
            {
                type: 'treeSelect',
                paramName: 'responsibleDepartmentId',
                id: 'responsibleDepartmentId',
                title: '0/200',
                num: 200,
                key: "responsibleDepartmentId",
                label: '子级责任部门',
                rules: [{ ...config.reg.required }],
                treeCheckable: false,
                span: 8,
                rows: 1,
                style: { width: 145 },
                shuoming: styles.zizerenbumen,
                treeData: this.state.treeData2,

            },


            {
                type: 'TextArea',
                paramName: 'subeventsBasicDescribe',
                id: 'subeventsBasicDescribe',
                title: '0/200',
                num: 200,
                key: "subeventsBasicDescribe",
                label: '子级事件说明',
                rules: [{ ...config.reg.required }],
                span: 24,
                rows: 2,
                backgroundColor: '#1aaef517',
                shuoming: styles.zishijianshuoming,
                style: { width: 750 },
            },

            {
                type: 'treeSelect',
                paramName: 'assistanceDepartmentRoles',
                id: 'assistanceDepartmentRoles',
                title: '0/200',
                num: 200,
                key: "assistanceDepartmentRoles",
                label: '子级协助部门',
                rules: [{ ...config.reg.required }],
                treeCheckable: true,
                span: 24,
                rows: 1,
                backgroundColor: '#1aaef517',
                shuoming: styles.zishijianshuoming,
                style: { width: 750 },
                treeData: this.state.treeData1,

            },
            {
                type: 'treeSelect',
                paramName: 'confirmUserRoleId',
                id: 'confirmUserRoleId',
                title: '0/200',
                num: 200,
                key: "confirmUserRoleId",
                label: '子级确认用户',
                rules: [{ ...config.reg.required }],
                treeCheckable: false,
                span: 10,
                shuoming: styles.zishijianmingcheng,
                backgroundColor: '#1aaef517',
                style: { width: 250 },
                treeData: this.state.treeData1,

            },
            {
                type: 'select',
                paramName: 'sureWay',
                id: 'sureWay',
                key: "sureWay",
                label: '子级确认方式',
                rules: [{ ...config.reg.required }],
                span: 12,
                placeholder: '请选择',
                style: { width: 100 },
                options: [
                    { text: '用户勾选', value: '用户勾选' },
                    { text: '上传文档', value: '上传文档' },
                ]
            },
            {
                type: 'TextArea',
                paramName: 'outcomeDocument',
                id: 'outcomeDocument',
                title: '0/200',
                num: 200,
                key: "outcomeDocument",
                label: '子级成果文件',
                rules: [{
                    required: true,
                    message: '必填'
                }],
                span: 24,
                rows: 2,
                shuoming: styles.zishijianshuoming,
                backgroundColor: '#1aaef517',
                // className:styles.outcomeDocument,
                style: { width: 750 },
            },
            {
                type: 'treeSelect',
                paramName: 'safetyInformationIdList',
                id: 'safetyInformationIdList',
                title: '0/200',
                num: 200,
                key: "safetyInformationIdList",
                label: '安全提示部门',
                rules: [{ ...config.reg.required }],
                rules: [{ ...config.reg.required }],
                treeCheckable: true,
                span: 12,
                rows: 1,
                backgroundColor: '#1aaef517',
                //   shuoming: styles.zishijianshuoming,
                style: { width: 250 },
                shuoming: styles.zishijianmingcheng,
                treeData: this.state.getTreeDataAn
            },
            {
                type: 'TextArea',
                paramName: 'safetyInformation',
                id: 'safetyInformation',
                title: '0/200',
                num: 200,
                key: "safetyInformation",
                label: '安全防护措施',
                rules: [{ ...config.reg.required }],
                span: 24,
                rows: 2,
                backgroundColor: '#1aaef517',
                shuoming: styles.zishijianshuoming,
                style: { width: 750 },
            },
            {
                type: 'select',
                paramName: 'auditWay',
                id: 'auditWay',
                key: "auditWay",
                label: '子级审核方式',
                shuoming: styles.zishijianmingcheng,
                rules: [{ ...config.reg.required }],
                span: 12,
                placeholder: '请选择',
                options: [
                    { text: '不需审核', value: '不需审核' },
                    { text: '系统内审核', value: '系统内审核' },
                    { text: '系统内抄送', value: '系统内抄送' },
                    { text: 'OA审批', value: 'OA审批' },
                ],
                backgroundColor: '#1aaef517',
                style: { width: 250 },
            },


        ];
        request({
            url: '/pm-web/projectmanage/subeventsbasicinfo/getTreeByEventBasicId',
            method: 'POST',
            data: { eventBasicId: this.props.eventBasicId, id: this.state.selectedKeys[0], isEqual: 0 }
        }).then(data => {
            if (data.rc === 0) {
                this.setState({
                    treeData: data.ret.treeList,
                    selectedKeys: data.ret.defaultStr,
                    expandedKeys: data.ret.treeId
                })

                //根据id获取详情
                request({
                    url: '/pm-web/projectmanage/subeventsbasicinfo/findOne',
                    method: 'POST',
                    data: { subeventsBasicId: this.state.selectedKeys[0] }
                }).then(data => {
                    console.log(data)

                    if (data.rc === 0) {
                        this.props.form.resetFields();//重置from表单所有值
                        if (data.ret.object.hierarchy != 1) {
                            AllsonArrList[1].styleLable = { display: 'none' }
                        }
                        this.setState({
                            shanChu: data.ret.shanChu,
                            shangYi: data.ret.shangYi,
                            xiaYi: data.ret.xiaYi,
                            xinZengTongJi: data.ret.xinZengTongJi,
                            xinZengXiaJi: data.ret.xinZengXiaJi,
                            parentEventId: data.ret.object.parentEventId,
                            hierarchy: data.ret.object.hierarchy,
                            eventBasicId: this.props.eventBasicId,
                            subeventsBasicId: data.ret.object.subeventsBasicId,
                            insertOrUpdate: data.ret.insertOrUpdate,//1新增2编辑

                            sonArrList: AllsonArrList

                        })
                    }
                })

            }
        })
    }

    //添加同级事件
    ontianjiaTong = () => {
        AllsonArrList = [
            {
                type: 'TextArea',
                paramName: 'subeventsBasicName',
                id: 'subeventsBasicName',
                title: '0/30',
                num: 30,
                key: "subeventsBasicName",
                label: '子级事件名称',
                style: { width: 250 },
                rules: [{ ...config.reg.required }],
                span: 10,
                rows: 1,
                shuoming: styles.zishijianmingcheng,

            },
            {
                type: 'TextArea',
                paramName: 'subeventsBasicWeight',
                id: 'subeventsBasicWeight',
                key: "subeventsBasicWeight",
                label: '子级权重',
                rules: [{ ...config.reg.long3 }],
                span: 6,
                title: '0/4',
                num: 4,
                rows: 1,
                style: { width: 100 },
            },
            {
                type: 'treeSelect',
                paramName: 'responsibleDepartmentId',
                id: 'responsibleDepartmentId',
                title: '0/200',
                num: 200,
                key: "responsibleDepartmentId",
                label: '子级责任部门',
                rules: [{ ...config.reg.required }],
                treeCheckable: false,
                span: 8,
                rows: 1,
                style: { width: 145 },
                shuoming: styles.zizerenbumen,
                treeData: this.state.treeData2,
            },


            {
                type: 'TextArea',
                paramName: 'subeventsBasicDescribe',
                id: 'subeventsBasicDescribe',
                title: '0/200',
                num: 200,
                key: "subeventsBasicDescribe",
                label: '子级事件说明',
                rules: [{ ...config.reg.required }],
                span: 24,
                rows: 2,
                backgroundColor: '#1aaef517',
                shuoming: styles.zishijianshuoming,
                style: { width: 750 },
            },

            {
                type: 'treeSelect',
                paramName: 'assistanceDepartmentRoles',
                id: 'assistanceDepartmentRoles',
                title: '0/200',
                num: 200,
                key: "assistanceDepartmentRoles",
                label: '子级协助部门',
                rules: [{ ...config.reg.required }],
                treeCheckable: true,
                span: 24,
                rows: 1,
                backgroundColor: '#1aaef517',
                shuoming: styles.zishijianshuoming,
                style: { width: 750 },
                treeData: this.state.treeData1,

            },
            {
                type: 'treeSelect',
                paramName: 'confirmUserRoleId',
                id: 'confirmUserRoleId',
                title: '0/200',
                num: 200,
                key: "confirmUserRoleId",
                label: '子级确认用户',
                rules: [{ ...config.reg.required }],
                treeCheckable: false,
                span: 10,
                shuoming: styles.zishijianmingcheng,
                backgroundColor: '#1aaef517',
                style: { width: 250 },
                treeData: this.state.treeData1,

            },
            {
                type: 'select',
                paramName: 'sureWay',
                id: 'sureWay',
                key: "sureWay",
                label: '子级确认方式',
                rules: [{ ...config.reg.required }],
                span: 12,
                placeholder: '请选择',
                style: { width: 100 },
                options: [
                    { text: '用户勾选', value: '用户勾选' },
                    { text: '上传文档', value: '上传文档' },
                ]
            },
            {
                type: 'TextArea',
                paramName: 'outcomeDocument',
                id: 'outcomeDocument',
                title: '0/200',
                num: 200,
                key: "outcomeDocument",
                label: '子级成果文件',
                rules: [{
                    required: true,
                    message: '必填'
                }],
                span: 24,
                rows: 2,
                shuoming: styles.zishijianshuoming,
                backgroundColor: '#1aaef517',
                // className:styles.outcomeDocument,
                style: { width: 750 },
            },
            {
                type: 'treeSelect',
                paramName: 'safetyInformationIdList',
                id: 'safetyInformationIdList',
                title: '0/200',
                num: 200,
                key: "safetyInformationIdList",
                label: '安全提示部门',
                rules: [{ ...config.reg.required }],
                rules: [{ ...config.reg.required }],
                treeCheckable: true,
                span: 12,
                rows: 1,
                backgroundColor: '#1aaef517',
                //   shuoming: styles.zishijianshuoming,
                style: { width: 250 },
                shuoming: styles.zishijianmingcheng,
                treeData: this.state.getTreeDataAn
            },
            {
                type: 'TextArea',
                paramName: 'safetyInformation',
                id: 'safetyInformation',
                title: '0/200',
                num: 200,
                key: "safetyInformation",
                label: '安全防护措施',
                rules: [{ ...config.reg.required }],
                span: 24,
                rows: 2,
                backgroundColor: '#1aaef517',
                shuoming: styles.zishijianshuoming,
                style: { width: 750 },
            },
            {
                type: 'select',
                paramName: 'auditWay',
                id: 'auditWay',
                key: "auditWay",
                label: '子级审核方式',
                shuoming: styles.zishijianmingcheng,
                rules: [{ ...config.reg.required }],
                span: 12,
                placeholder: '请选择',
                options: [
                    { text: '不需审核', value: '不需审核' },
                    { text: '系统内审核', value: '系统内审核' },
                    { text: '系统内抄送', value: '系统内抄送' },
                    { text: 'OA审批', value: 'OA审批' },

                ],
                backgroundColor: '#1aaef517',
                style: { width: 250 },
            },


        ];
        request({
            url: '/pm-web/projectmanage/subeventsbasicinfo/getTreeByEventBasicId',
            method: 'POST',
            data: { eventBasicId: this.props.eventBasicId, id: this.state.selectedKeys[0], isEqual: 1 }
        }).then(data => {
            if (data.rc === 0) {
                this.setState({
                    treeData: data.ret.treeList,
                    selectedKeys: data.ret.defaultStr,
                    expandedKeys: data.ret.treeId
                })

                //根据id获取详情
                request({
                    url: '/pm-web/projectmanage/subeventsbasicinfo/findOne',
                    method: 'POST',
                    data: { subeventsBasicId: this.state.selectedKeys[0] }
                }).then(data => {
                    console.log(data)
                    if (data.rc === 0) {
                        this.props.form.resetFields();//重置from表单所有值
                        if (data.ret.object.hierarchy != 1) {
                            AllsonArrList[1].styleLable = { display: 'none' }
                        } else {
                            AllsonArrList[1].styleLable = { display: '' }
                        }
                        this.setState({
                            shanChu: data.ret.shanChu,
                            shangYi: data.ret.shangYi,
                            xiaYi: data.ret.xiaYi,
                            xinZengTongJi: data.ret.xinZengTongJi,
                            xinZengXiaJi: data.ret.xinZengXiaJi,
                            parentEventId: data.ret.object.parentEventId,
                            hierarchy: data.ret.object.hierarchy,
                            eventBasicId: this.props.eventBasicId,
                            subeventsBasicId: data.ret.object.subeventsBasicId,
                            insertOrUpdate: data.ret.insertOrUpdate,//1新增2编辑

                            sonArrList: AllsonArrList

                        })
                    }
                })

            }
        })
    }

    //删除
    onDelte = () => {

        request({
            url: '/pm-web/projectmanage/subeventsbasicinfo/deleteSubeventsBasicInfo',
            method: 'POST',
            data: this.state.selectedKeys
        }).then(data => {
            if (data.rc === 0) {
                message.success('删除成功!')
                //查询事件树
                request({
                    url: '/pm-web/projectmanage/subeventsbasicinfo/getTreeByEventBasicId',
                    method: 'POST',
                    data: { eventBasicId: this.props.eventBasicId }
                }).then(data => {
                    if (data.rc === 0) {
                        this.setState({
                            treeData: data.ret.treeList,
                            selectedKeys: data.ret.defaultStr,
                            expandedKeys: data.ret.treeId
                        })
                        //根据id获取详情
                        request({
                            url: '/pm-web/projectmanage/subeventsbasicinfo/findOne',
                            method: 'POST',
                            data: { subeventsBasicId: data.ret.defaultStr[0] }
                        }).then(data => {
                            if (data.rc === 0) {
                                this.props.form.resetFields();//重置from表单所有值
                                console.log(data.ret.object)
                                var sonArrListTwo = [
                                    {
                                        type: 'TextArea',
                                        paramName: 'subeventsBasicName',
                                        id: 'subeventsBasicName',
                                        title: '0/30',
                                        num: 30,
                                        key: "subeventsBasicName",
                                        label: '子级事件名称',
                                        style: { width: 250 },
                                        rules: [{ ...config.reg.required }],
                                        span: 10,
                                        rows: 1,
                                        shuoming: styles.zishijianmingcheng,
                                        backgroundColor: '#1aaef517',

                                        initialValue: data.ret.object.subeventsBasicName

                                    },
                                    {
                                        type: 'TextArea',
                                        paramName: 'subeventsBasicWeight',
                                        id: 'subeventsBasicWeight',
                                        key: "subeventsBasicWeight",
                                        label: '子级权重',
                                        rules: [{ ...config.reg.long3 }],
                                        span: 6,
                                        title: '0/4',
                                        num: 4,
                                        rows: 1,
                                        style: { width: 100 },
                                        initialValue: data.ret.object.subeventsBasicWeight
                                    },
                                    {
                                        type: 'treeSelect',
                                        paramName: 'responsibleDepartmentId',
                                        id: 'responsibleDepartmentId',
                                        title: '0/200',
                                        num: 200,
                                        key: "responsibleDepartmentId",
                                        label: '子级责任部门',
                                        rules: [{ ...config.reg.required }],
                                        treeCheckable: false,
                                        span: 8,
                                        rows: 1,
                                        style: { width: 145 },
                                        shuoming: styles.zizerenbumen,
                                        initialValue: data.ret.object.responsibleDepartmentId,
                                        treeData: this.state.treeData2,


                                    },
                                    {
                                        type: 'TextArea',
                                        paramName: 'subeventsBasicDescribe',
                                        id: 'subeventsBasicDescribe',
                                        title: '0/200',
                                        num: 200,
                                        key: "subeventsBasicDescribe",
                                        label: '子级事件说明',
                                        rules: [{ ...config.reg.required }],
                                        span: 24,
                                        rows: 2,
                                        backgroundColor: '#1aaef517',
                                        shuoming: styles.zishijianshuoming,
                                        initialValue: data.ret.object.subeventsBasicDescribe
                                    },

                                    {
                                        type: 'treeSelect',
                                        paramName: 'assistanceDepartmentRoles',
                                        id: 'assistanceDepartmentRoles',
                                        title: '0/200',
                                        num: 200,
                                        key: "assistanceDepartmentRoles",
                                        label: '子级协助部门',
                                        rules: [{ ...config.reg.required }],
                                        treeCheckable: true,
                                        span: 24,
                                        rows: 1,
                                        backgroundColor: '#1aaef517',
                                        shuoming: styles.zishijianshuoming,
                                        style: { width: 750 },
                                        initialValue: data.ret.object.assistanceDepartmentRoleIdList,
                                        treeData: this.state.treeData1,

                                    },
                                    {
                                        type: 'treeSelect',
                                        paramName: 'confirmUserRoleId',
                                        id: 'confirmUserRoleId',
                                        title: '0/200',
                                        num: 200,
                                        key: "confirmUserRoleId",
                                        label: '子级确认用户',
                                        rules: [{ ...config.reg.required }],
                                        treeCheckable: false,
                                        span: 10,
                                        shuoming: styles.zishijianmingcheng,
                                        style: { width: 250 },
                                        initialValue: data.ret.object.confirmUserRoleId,
                                        treeData: this.state.treeData1,

                                    },
                                    {
                                        type: 'select',
                                        paramName: 'sureWay',
                                        id: 'sureWay',
                                        key: "sureWay",
                                        label: '子级确认方式',
                                        rules: [{ ...config.reg.required }],
                                        span: 12,
                                        placeholder: '请选择',
                                        initialValue: data.ret.object.sureWay == 1 ? '用户勾选' : '上传文档',
                                        options: [
                                            { text: '用户勾选', value: '用户勾选' },
                                            { text: '上传文档', value: '上传文档' },
                                        ],
                                        style: { width: 100 },

                                    },
                                    {
                                        type: 'TextArea',
                                        paramName: 'outcomeDocument',
                                        id: 'outcomeDocument',
                                        title: '0/200',
                                        num: 200,
                                        key: "outcomeDocument",
                                        label: '子级成果文件',
                                        rules: [{
                                            required: true,
                                            message: '必填'
                                        }],
                                        span: 24,
                                        rows: 2,
                                        shuoming: styles.zishijianshuoming,
                                        // className:styles.outcomeDocument,
                                        initialValue: data.ret.object.outcomeDocument,
                                        style: { width: 750 },
                                    },

                                    {
                                        type: 'treeSelect',
                                        paramName: 'safetyInformationIdList',
                                        id: 'safetyInformationIdList',
                                        title: '0/200',
                                        num: 200,
                                        key: "safetyInformationIdList",
                                        label: '安全提示部门',
                                        rules: [{ ...config.reg.required }],
                                        rules: [{ ...config.reg.required }],
                                        treeCheckable: true,
                                        span: 12,
                                        rows: 1,
                                        backgroundColor: '#1aaef517',
                                        initialValue: data.ret.object.safetyInformationIdList,
                                        style: { width: 250 },
                                        shuoming: styles.zishijianmingcheng,
                                        treeData: this.state.getTreeDataAn
                                    },
                                    {
                                        type: 'TextArea',
                                        paramName: 'safetyInformation',
                                        id: 'safetyInformation',
                                        title: '0/200',
                                        num: 200,
                                        key: "safetyInformation",
                                        label: '安全防护措施',
                                        rules: [{ ...config.reg.required }],
                                        span: 24,
                                        rows: 2,
                                        backgroundColor: '#1aaef517',
                                        shuoming: styles.zishijianshuoming,
                                        style: { width: 750 },
                                        initialValue: data.ret.object.safetyInformation,
                                    },

                                ]

                                //上方sonArrList 为基础子级事件模板,下方判断为根据编辑内容显示不同的定制模板
                                if (data.ret.object.sureWay == 1 || data.ret.object.sureWay == '') {
                                    //sureWay=1说明用户勾选不需添加  默认自能选择不需审核
                                    sonArrListTwo.push(
                                        {
                                            type: 'select',
                                            paramName: 'auditWay',
                                            id: 'auditWay',
                                            key: "auditWay",
                                            label: '子级审核方式',
                                            shuoming: styles.zishijianmingcheng,
                                            rules: [{ ...config.reg.required }],
                                            span: 12,
                                            placeholder: '请选择',
                                            initialValue: '不需审核',
                                            options: [
                                                { text: '不需审核', value: '不需审核' },
                                                { text: '系统内审核', value: '系统内审核' },
                                                { text: '系统内抄送', value: '系统内抄送' },
                                                { text: 'OA审批', value: 'OA审批' },

                                            ],
                                            style: { width: 250 },
                                        },
                                    )
                                } else {
                                    //说明用户选择上传文档,则会有三种不同的情况看下
                                    if (data.ret.object.auditWay == 2) {
                                        //说明为系统内审核
                                        console.log(data.ret.object)
                                        sonArrListTwo.push(
                                            {
                                                type: 'select',
                                                paramName: 'auditWay',
                                                id: 'auditWay',
                                                key: "auditWay",
                                                label: '子级审核方式',
                                                shuoming: styles.zishijianmingcheng,
                                                rules: [{ ...config.reg.required }],
                                                span: 12,
                                                placeholder: '请选择',
                                                initialValue: '系统内审核',
                                                options: [
                                                    { text: '不需审核', value: '不需审核' },
                                                    { text: '系统内审核', value: '系统内审核' },
                                                    { text: '系统内抄送', value: '系统内抄送' },
                                                    { text: 'OA审批', value: 'OA审批' },
                                                ],
                                                style: { width: 250 },
                                            },
                                            {
                                                type: 'treeSelect',
                                                paramName: 'eventAuditRoleList',
                                                id: 'eventAuditRoleList',
                                                title: '0/200',
                                                num: 200,
                                                key: "eventAuditRoleList",
                                                label: '子级审核用户',
                                                rules: [{ ...config.reg.required }],
                                                treeCheckable: true,
                                                span: 12,
                                                // rows: 1,
                                                // colSpan: 24,
                                                initialValue: data.ret.object.eventAuditRoleIdList,
                                                style: { width: 250 },
                                                shuoming: styles.zishijianshuoming,
                                                treeData: this.state.treeData1,
                                            },
                                            {
                                                type: 'treeSelect',
                                                paramName: 'eventAuditCCRoleList',
                                                id: 'eventAuditCCRoleList',
                                                title: '0/200',
                                                num: 200,
                                                key: "eventAuditCCRoleList",
                                                label: '子级抄送用户',
                                                rules: [{ ...config.reg.required }],
                                                treeCheckable: true,
                                                span: 12,
                                                shuoming: styles.zishijianshuoming,
                                                // className: styles.outcomeDocument,
                                                // rows: 1,
                                                // colSpan: 24,
                                                initialValue: data.ret.object.eventAuditCCRoleIdList,
                                                style: { width: 250 },
                                                treeData: this.state.treeData1,
                                            }
                                        )

                                    } else if (data.ret.object.auditWay == 3) {
                                        //系统内抄送
                                        sonArrListTwo.push(
                                            {
                                                type: 'select',
                                                paramName: 'auditWay',
                                                id: 'auditWay',
                                                key: "auditWay",
                                                label: '子级审核方式',
                                                shuoming: styles.zishijianmingcheng,
                                                rules: [{ ...config.reg.required }],
                                                span: 12,
                                                placeholder: '请选择',
                                                initialValue: '系统内抄送',
                                                style: { width: 250 },
                                                options: [
                                                    { text: '不需审核', value: '不需审核' },
                                                    { text: '系统内审核', value: '系统内审核' },
                                                    { text: '系统内抄送', value: '系统内抄送' },
                                                    { text: 'OA审批', value: 'OA审批' },

                                                ]
                                            },
                                            {
                                                type: 'treeSelect',
                                                paramName: 'eventAuditCCRoleList',
                                                id: 'eventAuditCCRoleList',
                                                title: '0/200',
                                                num: 200,
                                                key: "eventAuditCCRoleList",
                                                label: '子级抄送用户',
                                                rules: [{ ...config.reg.required }],
                                                treeCheckable: true,
                                                span: 24,
                                                // shuoming: styles.zishijianshuoming,
                                                // className: styles.outcomeDocument,
                                                // rows: 1,
                                                // colSpan: 24,
                                                style: { width: 750 },
                                                initialValue: data.ret.object.eventAuditCCRoleIdList,
                                                treeData: this.state.treeData1,
                                            }
                                        )
                                    } else if (data.ret.object.auditWay == 4) {
                                        //OA审批
                                        sonArrListTwo.push(
                                            {
                                                type: 'select',
                                                paramName: 'auditWay',
                                                id: 'auditWay',
                                                key: "auditWay",
                                                label: '子级审核方式',
                                                shuoming: styles.zishijianmingcheng,
                                                rules: [{ ...config.reg.required }],
                                                span: 12,
                                                style: { width: 250 },
                                                placeholder: '请选择',
                                                initialValue: 'OA审批',
                                                options: [
                                                    { text: '不需审核', value: '不需审核' },
                                                    { text: '系统内审核', value: '系统内审核' },
                                                    { text: '系统内抄送', value: '系统内抄送' },
                                                    { text: 'OA审批', value: 'OA审批' },
                                                ]
                                            },
                                            // {
                                            //     type: 'select',
                                            //     paramName: 'oaProcess',
                                            //     id: 'oaProcess',
                                            //     key: "oaProcess",
                                            //     label: 'OA审批流',
                                            //     rules: [{ ...config.reg.required }],
                                            //     initialValue: data.ret.object.oaProcess,
                                            //     span: 12,
                                            //     style: { width: 250 },
                                            //     placeholder: '请选择',
                                            //     options: [
                                            //         { text: '1', value: '1' },
                                            //     ]
                                            // },
                                        )
                                    }
                                }

                                this.setState({
                                    shanChu: data.ret.shanChu,
                                    shangYi: data.ret.shangYi,
                                    xiaYi: data.ret.xiaYi,
                                    xinZengTongJi: data.ret.xinZengTongJi,
                                    xinZengXiaJi: data.ret.xinZengXiaJi,
                                    parentEventId: data.ret.object.parentEventId,
                                    hierarchy: data.ret.object.hierarchy,
                                    eventBasicId: this.props.eventBasicId,
                                    subeventsBasicId: data.ret.object.subeventsBasicId,
                                    insertOrUpdate: data.ret.insertOrUpdate,//1新增2编辑

                                    sonArrList: sonArrListTwo

                                })
                            }
                        })
                    }
                })

            } else {
                message.warning('删除失败')
            }
        })
    }

    //上移
    onUp = () => {
        request({
            url: '/pm-web/projectmanage/subeventsbasicinfo/updateSubeventsBasicInfoNum',
            method: 'POST',
            data: { subeventsBasicId: this.state.selectedKeys[0], direction: 'up' }
        }).then(data => {
            if (data.rc === 0) {
                message.success('上移成功!')
                //查询事件树
                request({
                    url: '/pm-web/projectmanage/subeventsbasicinfo/getTreeByEventBasicId',
                    method: 'POST',
                    data: { eventBasicId: this.props.eventBasicId }
                }).then(data => {
                    if (data.rc === 0) {
                        this.setState({
                            treeData: data.ret.treeList,
                            selectedKeys: this.state.selectedKeys,
                            expandedKeys: this.state.selectedKeys
                        })
                        //根据id获取详情
                        request({
                            url: '/pm-web/projectmanage/subeventsbasicinfo/findOne',
                            method: 'POST',
                            data: { subeventsBasicId: this.state.selectedKeys[0] }
                        }).then(data => {
                            if (data.rc === 0) {
                                this.props.form.resetFields();//重置from表单所有值

                                var sonArrListTwo = [
                                    {
                                        type: 'TextArea',
                                        paramName: 'subeventsBasicName',
                                        id: 'subeventsBasicName',
                                        title: '0/30',
                                        num: 30,
                                        key: "subeventsBasicName",
                                        label: '子级事件名称',
                                        style: { width: 250 },
                                        rules: [{ ...config.reg.required }],
                                        span: 10,
                                        rows: 1,
                                        initialValue: data.ret.object.subeventsBasicName

                                    },
                                    {
                                        type: 'TextArea',
                                        paramName: 'subeventsBasicWeight',
                                        id: 'subeventsBasicWeight',
                                        key: "subeventsBasicWeight",
                                        label: '子级权重',
                                        rules: [{ ...config.reg.long3 }],
                                        span: 6,
                                        title: '0/4',
                                        num: 4,
                                        rows: 1,
                                        style: { width: 100 },
                                        initialValue: data.ret.object.subeventsBasicWeight
                                    },
                                    {
                                        type: 'treeSelect',
                                        paramName: 'responsibleDepartmentId',
                                        id: 'responsibleDepartmentId',
                                        title: '0/200',
                                        num: 200,
                                        key: "responsibleDepartmentId",
                                        label: '子级责任部门',
                                        rules: [{ ...config.reg.required }],
                                        treeCheckable: false,
                                        span: 8,
                                        rows: 1,
                                        style: { width: 145 },
                                        initialValue: data.ret.object.responsibleDepartmentId,
                                        treeData: this.state.treeData2,


                                    },
                                    {
                                        type: 'TextArea',
                                        paramName: 'subeventsBasicDescribe',
                                        id: 'subeventsBasicDescribe',
                                        title: '0/200',
                                        num: 200,
                                        key: "subeventsBasicDescribe",
                                        label: '子级事件说明',
                                        rules: [{ ...config.reg.required }],
                                        span: 24,
                                        rows: 2,
                                        backgroundColor: '#1aaef517',
                                        shuoming: styles.zishijianshuoming,
                                        style: { width: 750 },
                                        initialValue: data.ret.object.subeventsBasicDescribe
                                    },

                                    {
                                        type: 'treeSelect',
                                        paramName: 'assistanceDepartmentRoles',
                                        id: 'assistanceDepartmentRoles',
                                        title: '0/200',
                                        num: 200,
                                        key: "assistanceDepartmentRoles",
                                        label: '子级协助部门',
                                        rules: [{ ...config.reg.required }],
                                        treeCheckable: true,
                                        span: 24,
                                        rows: 1,
                                        backgroundColor: '#1aaef517',
                                        shuoming: styles.zishijianshuoming,
                                        style: { width: 750 },
                                        initialValue: data.ret.object.assistanceDepartmentRoleIdList,
                                        treeData: this.state.treeData1,

                                    },
                                    {
                                        type: 'treeSelect',
                                        paramName: 'confirmUserRoleId',
                                        id: 'confirmUserRoleId',
                                        title: '0/200',
                                        num: 200,
                                        key: "confirmUserRoleId",
                                        label: '子级确认用户',
                                        rules: [{ ...config.reg.required }],
                                        treeCheckable: false,
                                        span: 10,
                                        shuoming: styles.zishijianmingcheng,
                                        style: { width: 250 },
                                        initialValue: data.ret.object.confirmUserRoleId,
                                        treeData: this.state.treeData1,

                                    },
                                    {
                                        type: 'select',
                                        paramName: 'sureWay',
                                        id: 'sureWay',
                                        key: "sureWay",
                                        label: '子级确认方式',
                                        rules: [{ ...config.reg.required }],
                                        span: 12,
                                        placeholder: '请选择',
                                        initialValue: data.ret.object.sureWay == 1 ? '用户勾选' : '上传文档',
                                        options: [
                                            { text: '用户勾选', value: '用户勾选' },
                                            { text: '上传文档', value: '上传文档' },
                                        ],
                                        style: { width: 100 },

                                    },
                                    {
                                        type: 'TextArea',
                                        paramName: 'outcomeDocument',
                                        id: 'outcomeDocument',
                                        title: '0/200',
                                        num: 200,
                                        key: "outcomeDocument",
                                        label: '子级成果文件',
                                        rules: [{
                                            required: true,
                                            message: '必填'
                                        }],
                                        span: 24,
                                        rows: 2,
                                        shuoming: styles.zishijianshuoming,
                                        // className:styles.outcomeDocument,
                                        initialValue: data.ret.object.outcomeDocument,
                                        style: { width: 750 },
                                    },
                                    {
                                        type: 'treeSelect',
                                        paramName: 'safetyInformationIdList',
                                        id: 'safetyInformationIdList',
                                        title: '0/200',
                                        num: 200,
                                        key: "safetyInformationIdList",
                                        label: '安全提示部门',
                                        rules: [{ ...config.reg.required }],
                                        treeCheckable: true,
                                        span: 12,
                                        rows: 1,
                                        backgroundColor: '#1aaef517',
                                        initialValue: data.ret.object.safetyInformationIdList,
                                        style: { width: 250 },
                                        shuoming: styles.zishijianmingcheng,
                                        treeData: this.state.getTreeDataAn
                                    },
                                    {
                                        type: 'TextArea',
                                        paramName: 'safetyInformation',
                                        id: 'safetyInformation',
                                        title: '0/200',
                                        num: 200,
                                        key: "safetyInformation",
                                        label: '安全防护措施',
                                        rules: [{ ...config.reg.required }],
                                        span: 24,
                                        rows: 2,
                                        backgroundColor: '#1aaef517',
                                        shuoming: styles.zishijianshuoming,
                                        style: { width: 750 },
                                        initialValue: data.ret.object.safetyInformation,
                                    },

                                ]

                                //上方sonArrList 为基础子级事件模板,下方判断为根据编辑内容显示不同的定制模板
                                if (data.ret.object.sureWay == 1 || data.ret.object.sureWay == '') {
                                    //sureWay=1说明用户勾选不需添加  默认自能选择不需审核
                                    sonArrListTwo.push(
                                        {
                                            type: 'select',
                                            paramName: 'auditWay',
                                            id: 'auditWay',
                                            key: "auditWay",
                                            label: '子级审核方式',
                                            shuoming: styles.zishijianmingcheng,
                                            rules: [{ ...config.reg.required }],
                                            span: 12,
                                            placeholder: '请选择',
                                            initialValue: '不需审核',
                                            options: [
                                                { text: '不需审核', value: '不需审核' },
                                                { text: '系统内审核', value: '系统内审核' },
                                                { text: '系统内抄送', value: '系统内抄送' },
                                                { text: 'OA审批', value: 'OA审批' },
                                            ],
                                            style: { width: 250 },
                                        },
                                    )
                                } else {
                                    //说明用户选择上传文档,则会有三种不同的情况看下
                                    if (data.ret.object.auditWay == 2) {
                                        //说明为系统内审核
                                        console.log(data.ret.object)
                                        sonArrListTwo.push(
                                            {
                                                type: 'select',
                                                paramName: 'auditWay',
                                                id: 'auditWay',
                                                key: "auditWay",
                                                label: '子级审核方式',
                                                shuoming: styles.zishijianmingcheng,
                                                rules: [{ ...config.reg.required }],
                                                span: 12,
                                                placeholder: '请选择',
                                                initialValue: '系统内审核',
                                                options: [
                                                    { text: '不需审核', value: '不需审核' },
                                                    { text: '系统内审核', value: '系统内审核' },
                                                    { text: '系统内抄送', value: '系统内抄送' },
                                                    { text: 'OA审批', value: 'OA审批' },
                                                ],
                                                style: { width: 250 },
                                            },
                                            {
                                                type: 'treeSelect',
                                                paramName: 'eventAuditRoleList',
                                                id: 'eventAuditRoleList',
                                                title: '0/200',
                                                num: 200,
                                                key: "eventAuditRoleList",
                                                label: '子级审核用户',
                                                rules: [{ ...config.reg.required }],
                                                treeCheckable: true,
                                                span: 12,
                                                // rows: 1,
                                                // colSpan: 24,
                                                initialValue: data.ret.object.eventAuditRoleIdList,
                                                style: { width: 750 },
                                                shuoming: styles.zishijianshuoming,
                                                treeData: this.state.treeData1,
                                            },
                                            {
                                                type: 'treeSelect',
                                                paramName: 'eventAuditCCRoleList',
                                                id: 'eventAuditCCRoleList',
                                                title: '0/200',
                                                num: 200,
                                                key: "eventAuditCCRoleList",
                                                label: '子级抄送用户',
                                                rules: [{ ...config.reg.required }],
                                                treeCheckable: true,
                                                span: 24,
                                                shuoming: styles.zishijianshuoming,
                                                // className: styles.outcomeDocument,
                                                // rows: 1,
                                                // colSpan: 24,
                                                initialValue: data.ret.object.eventAuditCCRoleIdList,
                                                style: { width: 750 },
                                                treeData: this.state.treeData1,
                                            }
                                        )

                                    } else if (data.ret.object.auditWay == 3) {
                                        //系统内抄送
                                        sonArrListTwo.push(
                                            {
                                                type: 'select',
                                                paramName: 'auditWay',
                                                id: 'auditWay',
                                                key: "auditWay",
                                                label: '子级审核方式',
                                                shuoming: styles.zishijianmingcheng,
                                                rules: [{ ...config.reg.required }],
                                                span: 12,
                                                placeholder: '请选择',
                                                initialValue: '系统内抄送',
                                                style: { width: 250 },
                                                options: [
                                                    { text: '不需审核', value: '不需审核' },
                                                    { text: '系统内审核', value: '系统内审核' },
                                                    { text: '系统内抄送', value: '系统内抄送' },
                                                    { text: 'OA审批', value: 'OA审批' },

                                                ]
                                            },
                                            {
                                                type: 'treeSelect',
                                                paramName: 'eventAuditCCRoleList',
                                                id: 'eventAuditCCRoleList',
                                                title: '0/200',
                                                num: 200,
                                                key: "eventAuditCCRoleList",
                                                label: '子级抄送用户',
                                                rules: [{ ...config.reg.required }],
                                                treeCheckable: true,
                                                span: 24,
                                                // shuoming: styles.zishijianshuoming,
                                                // className: styles.outcomeDocument,
                                                // rows: 1,
                                                // colSpan: 24,
                                                style: { width: 750 },
                                                initialValue: data.ret.object.eventAuditCCRoleIdList,
                                                treeData: this.state.treeData1,
                                            }
                                        )
                                    } else if (data.ret.object.auditWay == 4) {
                                        //OA审批
                                        sonArrListTwo.push(
                                            {
                                                type: 'select',
                                                paramName: 'auditWay',
                                                id: 'auditWay',
                                                key: "auditWay",
                                                label: '子级审核方式',
                                                shuoming: styles.zishijianmingcheng,
                                                rules: [{ ...config.reg.required }],
                                                span: 12,
                                                style: { width: 250 },
                                                placeholder: '请选择',
                                                initialValue: 'OA审批',
                                                options: [
                                                    { text: '不需审核', value: '不需审核' },
                                                    { text: '系统内审核', value: '系统内审核' },
                                                    { text: '系统内抄送', value: '系统内抄送' },
                                                    { text: 'OA审批', value: 'OA审批' },

                                                ]
                                            },
                                            // {
                                            //     type: 'select',
                                            //     paramName: 'oaProcess',
                                            //     id: 'oaProcess',
                                            //     key: "oaProcess",
                                            //     label: 'OA审批流',
                                            //     rules: [{ ...config.reg.required }],
                                            //     initialValue: data.ret.object.oaProcess,
                                            //     span: 12,
                                            //     style: { width: 250 },
                                            //     placeholder: '请选择',
                                            //     options: [
                                            //         { text: '1', value: '1' },
                                            //     ]
                                            // },
                                        )
                                    }
                                }

                                this.setState({
                                    shanChu: data.ret.shanChu,
                                    shangYi: data.ret.shangYi,
                                    xiaYi: data.ret.xiaYi,
                                    xinZengTongJi: data.ret.xinZengTongJi,
                                    xinZengXiaJi: data.ret.xinZengXiaJi,
                                    parentEventId: data.ret.object.parentEventId,
                                    hierarchy: data.ret.object.hierarchy,
                                    eventBasicId: this.props.eventBasicId,
                                    subeventsBasicId: data.ret.object.subeventsBasicId,
                                    insertOrUpdate: data.ret.insertOrUpdate,//1新增2编辑

                                    sonArrList: sonArrListTwo

                                })
                            }
                        })
                    }
                })

            } else {
                message.warning('上移失败')
            }
        })
    }

    //下移
    onDown = () => {
        request({
            url: '/pm-web/projectmanage/subeventsbasicinfo/updateSubeventsBasicInfoNum',
            method: 'POST',
            data: { subeventsBasicId: this.state.selectedKeys[0], direction: 'below' }
        }).then(data => {
            if (data.rc === 0) {
                message.success('下移成功!')
                //查询事件树
                request({
                    url: '/pm-web/projectmanage/subeventsbasicinfo/getTreeByEventBasicId',
                    method: 'POST',
                    data: { eventBasicId: this.props.eventBasicId }
                }).then(data => {
                    if (data.rc === 0) {
                        this.setState({
                            treeData: data.ret.treeList,
                            selectedKeys: this.state.selectedKeys,
                            expandedKeys: this.state.selectedKeys
                        })
                        //根据id获取详情
                        request({
                            url: '/pm-web/projectmanage/subeventsbasicinfo/findOne',
                            method: 'POST',
                            data: { subeventsBasicId: this.state.selectedKeys[0] }
                        }).then(data => {
                            if (data.rc === 0) {
                                this.props.form.resetFields();//重置from表单所有值

                                var sonArrListTwo = [
                                    {
                                        type: 'TextArea',
                                        paramName: 'subeventsBasicName',
                                        id: 'subeventsBasicName',
                                        title: '0/30',
                                        num: 30,
                                        key: "subeventsBasicName",
                                        label: '子级事件名称',
                                        style: { width: 250 },
                                        rules: [{ ...config.reg.required }],
                                        span: 10,
                                        rows: 1,
                                        shuoming: styles.zishijianmingcheng,
                                        initialValue: data.ret.object.subeventsBasicName

                                    },
                                    {
                                        type: 'TextArea',
                                        paramName: 'subeventsBasicWeight',
                                        id: 'subeventsBasicWeight',
                                        key: "subeventsBasicWeight",
                                        label: '子级权重',
                                        rules: [{ ...config.reg.long3 }],
                                        span: 6,
                                        title: '0/4',
                                        num: 4,
                                        rows: 1,
                                        style: { width: 100 },
                                        initialValue: data.ret.object.subeventsBasicWeight
                                    },
                                    {
                                        type: 'treeSelect',
                                        paramName: 'responsibleDepartmentId',
                                        id: 'responsibleDepartmentId',
                                        title: '0/200',
                                        num: 200,
                                        key: "responsibleDepartmentId",
                                        label: '子级责任部门',
                                        rules: [{ ...config.reg.required }],
                                        treeCheckable: false,
                                        span: 8,
                                        rows: 1,
                                        style: { width: 145 },
                                        shuoming: styles.zizerenbumen,
                                        initialValue: data.ret.object.responsibleDepartmentId,
                                        treeData: this.state.treeData2,


                                    },
                                    {
                                        type: 'TextArea',
                                        paramName: 'subeventsBasicDescribe',
                                        id: 'subeventsBasicDescribe',
                                        title: '0/200',
                                        num: 200,
                                        key: "subeventsBasicDescribe",
                                        label: '子级事件说明',
                                        rules: [{ ...config.reg.required }],
                                        span: 24,
                                        rows: 2,
                                        backgroundColor: '#1aaef517',
                                        shuoming: styles.zishijianshuoming,
                                        style: { width: 750 },
                                        initialValue: data.ret.object.subeventsBasicDescribe
                                    },

                                    {
                                        type: 'treeSelect',
                                        paramName: 'assistanceDepartmentRoles',
                                        id: 'assistanceDepartmentRoles',
                                        title: '0/200',
                                        num: 200,
                                        key: "assistanceDepartmentRoles",
                                        label: '子级协助部门',
                                        rules: [{ ...config.reg.required }],
                                        treeCheckable: true,
                                        span: 24,
                                        rows: 1,
                                        backgroundColor: '#1aaef517',
                                        shuoming: styles.zishijianshuoming,
                                        style: { width: 750 },
                                        initialValue: data.ret.object.assistanceDepartmentRoleIdList,
                                        treeData: this.state.treeData1,

                                    },
                                    {
                                        type: 'treeSelect',
                                        paramName: 'confirmUserRoleId',
                                        id: 'confirmUserRoleId',
                                        title: '0/200',
                                        num: 200,
                                        key: "confirmUserRoleId",
                                        label: '子级确认用户',
                                        rules: [{ ...config.reg.required }],
                                        treeCheckable: false,
                                        span: 10,
                                        backgroundColor: '#1aaef517',
                                        shuoming: styles.zishijianmingcheng,
                                        style: { width: 250 },
                                        initialValue: data.ret.object.confirmUserRoleId,
                                        treeData: this.state.treeData1,

                                    },
                                    {
                                        type: 'select',
                                        paramName: 'sureWay',
                                        id: 'sureWay',
                                        key: "sureWay",
                                        label: '子级确认方式',
                                        rules: [{ ...config.reg.required }],
                                        span: 12,
                                        placeholder: '请选择',
                                        initialValue: data.ret.object.sureWay == 1 ? '用户勾选' : '上传文档',
                                        options: [
                                            { text: '用户勾选', value: '用户勾选' },
                                            { text: '上传文档', value: '上传文档' },
                                        ],
                                        style: { width: 100 },

                                    },
                                    {
                                        type: 'TextArea',
                                        paramName: 'outcomeDocument',
                                        id: 'outcomeDocument',
                                        title: '0/200',
                                        num: 200,
                                        key: "outcomeDocument",
                                        label: '子级成果文件',
                                        rules: [{
                                            required: true,
                                            message: '必填'
                                        }],
                                        span: 24,
                                        rows: 2,
                                        shuoming: styles.zishijianshuoming,
                                        // className:styles.outcomeDocument,
                                        initialValue: data.ret.object.outcomeDocument,
                                        style: { width: 750 },
                                    },

                                    {
                                        type: 'treeSelect',
                                        paramName: 'safetyInformationIdList',
                                        id: 'safetyInformationIdList',
                                        title: '0/200',
                                        num: 200,
                                        key: "safetyInformationIdList",
                                        label: '安全提示部门',
                                        rules: [{ ...config.reg.required }],
                                        treeCheckable: true,
                                        span: 12,
                                        rows: 1,
                                        backgroundColor: '#1aaef517',
                                        initialValue: data.ret.object.safetyInformationIdList,
                                        style: { width: 250 },
                                        shuoming: styles.zishijianmingcheng,
                                        treeData: this.state.getTreeDataAn
                                    },
                                    {
                                        type: 'TextArea',
                                        paramName: 'safetyInformation',
                                        id: 'safetyInformation',
                                        title: '0/200',
                                        num: 200,
                                        key: "safetyInformation",
                                        label: '安全防护措施',
                                        rules: [{ ...config.reg.required }],
                                        span: 24,
                                        rows: 2,
                                        backgroundColor: '#1aaef517',
                                        shuoming: styles.zishijianshuoming,
                                        style: { width: 750 },
                                        initialValue: data.ret.object.safetyInformation,
                                    },

                                ]

                                //上方sonArrList 为基础子级事件模板,下方判断为根据编辑内容显示不同的定制模板
                                if (data.ret.object.sureWay == 1 || data.ret.object.sureWay == '') {
                                    //sureWay=1说明用户勾选不需添加  默认自能选择不需审核
                                    sonArrListTwo.push(
                                        {
                                            type: 'select',
                                            paramName: 'auditWay',
                                            id: 'auditWay',
                                            key: "auditWay",
                                            label: '子级审核方式',
                                            shuoming: styles.zishijianmingcheng,
                                            rules: [{ ...config.reg.required }],
                                            span: 12,
                                            placeholder: '请选择',
                                            initialValue: '不需审核',
                                            options: [
                                                { text: '不需审核', value: '不需审核' },
                                                { text: '系统内审核', value: '系统内审核' },
                                                { text: '系统内抄送', value: '系统内抄送' },
                                                { text: 'OA审批', value: 'OA审批' },

                                            ],
                                            style: { width: 250 },
                                        },
                                    )
                                } else {
                                    //说明用户选择上传文档,则会有三种不同的情况看下
                                    if (data.ret.object.auditWay == 2) {
                                        //说明为系统内审核
                                        console.log(data.ret.object)
                                        sonArrListTwo.push(
                                            {
                                                type: 'select',
                                                paramName: 'auditWay',
                                                id: 'auditWay',
                                                key: "auditWay",
                                                label: '子级审核方式',
                                                shuoming: styles.zishijianmingcheng,
                                                rules: [{ ...config.reg.required }],
                                                span: 12,
                                                placeholder: '请选择',
                                                initialValue: '系统内审核',
                                                options: [
                                                    { text: '不需审核', value: '不需审核' },
                                                    { text: '系统内审核', value: '系统内审核' },
                                                    { text: '系统内抄送', value: '系统内抄送' },
                                                    { text: 'OA审批', value: 'OA审批' },

                                                ],
                                                style: { width: 250 },
                                            },
                                            {
                                                type: 'treeSelect',
                                                paramName: 'eventAuditRoleList',
                                                id: 'eventAuditRoleList',
                                                title: '0/200',
                                                num: 200,
                                                key: "eventAuditRoleList",
                                                label: '子级审核用户',
                                                rules: [{ ...config.reg.required }],
                                                treeCheckable: true,
                                                span: 24,
                                                // rows: 1,
                                                // colSpan: 24,
                                                initialValue: data.ret.object.eventAuditRoleIdList,
                                                style: { width: 750 },
                                                shuoming: styles.zishijianshuoming,
                                                treeData: this.state.treeData1,
                                            },
                                            {
                                                type: 'treeSelect',
                                                paramName: 'eventAuditCCRoleList',
                                                id: 'eventAuditCCRoleList',
                                                title: '0/200',
                                                num: 200,
                                                key: "eventAuditCCRoleList",
                                                label: '子级抄送用户',
                                                rules: [{ ...config.reg.required }],
                                                treeCheckable: true,
                                                span: 24,
                                                // rows: 1,
                                                // colSpan: 24,
                                                shuoming: styles.zishijianshuoming,
                                                // className: styles.outcomeDocument,
                                                initialValue: data.ret.object.eventAuditCCRoleIdList,
                                                style: { width: 750 },
                                                treeData: this.state.treeData1,
                                            }
                                        )

                                    } else if (data.ret.object.auditWay == 3) {
                                        //系统内抄送
                                        sonArrListTwo.push(
                                            {
                                                type: 'select',
                                                paramName: 'auditWay',
                                                id: 'auditWay',
                                                key: "auditWay",
                                                label: '子级审核方式',
                                                shuoming: styles.zishijianmingcheng,
                                                rules: [{ ...config.reg.required }],
                                                span: 12,
                                                placeholder: '请选择',
                                                initialValue: '系统内抄送',
                                                style: { width: 250 },
                                                options: [
                                                    { text: '不需审核', value: '不需审核' },
                                                    { text: '系统内审核', value: '系统内审核' },
                                                    { text: '系统内抄送', value: '系统内抄送' },
                                                    { text: 'OA审批', value: 'OA审批' },
                                                ]
                                            },
                                            {
                                                type: 'treeSelect',
                                                paramName: 'eventAuditCCRoleList',
                                                id: 'eventAuditCCRoleList',
                                                title: '0/200',
                                                num: 200,
                                                key: "eventAuditCCRoleList",
                                                label: '子级抄送用户',
                                                rules: [{ ...config.reg.required }],
                                                treeCheckable: true,
                                                span: 24,
                                                // rows: 1,
                                                // colSpan: 24,
                                                // shuoming: styles.zishijianshuoming,
                                                // className: styles.outcomeDocument,
                                                style: { width: 750 },
                                                initialValue: data.ret.object.eventAuditCCRoleIdList,
                                                treeData: this.state.treeData1,
                                            }
                                        )
                                    } else if (data.ret.object.auditWay == 4) {
                                        //OA审批
                                        sonArrListTwo.push(
                                            {
                                                type: 'select',
                                                paramName: 'auditWay',
                                                id: 'auditWay',
                                                key: "auditWay",
                                                label: '子级审核方式',
                                                shuoming: styles.zishijianmingcheng,
                                                rules: [{ ...config.reg.required }],
                                                span: 12,
                                                style: { width: 250 },
                                                placeholder: '请选择',
                                                initialValue: 'OA审批',
                                                options: [
                                                    { text: '不需审核', value: '不需审核' },
                                                    { text: '系统内审核', value: '系统内审核' },
                                                    { text: '系统内抄送', value: '系统内抄送' },
                                                    { text: 'OA审批', value: 'OA审批' },

                                                ]
                                            },
                                        )
                                    }
                                }

                                this.setState({
                                    shanChu: data.ret.shanChu,
                                    shangYi: data.ret.shangYi,
                                    xiaYi: data.ret.xiaYi,
                                    xinZengTongJi: data.ret.xinZengTongJi,
                                    xinZengXiaJi: data.ret.xinZengXiaJi,
                                    parentEventId: data.ret.object.parentEventId,
                                    hierarchy: data.ret.object.hierarchy,
                                    eventBasicId: this.props.eventBasicId,
                                    subeventsBasicId: data.ret.object.subeventsBasicId,
                                    insertOrUpdate: data.ret.insertOrUpdate,//1新增2编辑

                                    sonArrList: sonArrListTwo

                                })
                            }
                        })
                    }
                })

            } else {
                message.warning('下移失败')
            }
        })
    }

    render() {
        let t = this;
        let { tableData, upDis } = t.state;

        let { getFieldDecorator } = t.props.form;

        let titleText = this.props.titleText
        let arr1 = this.props.moddleArr;
        return (
            <div style={{ width: '100%', height: '100vh', display: 'flex', flexDirection: 'column' }}>
                <div style={{ flex: '1', display: 'flex', padding: 10, overflow: 'auto' }}>
                    <div style={{ width: 250, backgroundColor: '#f7f5f5', display: 'flex' }}>

                        <Tree
                            // defaultExpandAll={true}
                            onExpand={this.onExpand}
                            expandedKeys={this.state.expandedKeys}
                            // autoExpandParent={this.state.autoExpandParent}


                            onSelect={this.onSelect}
                            selectedKeys={this.state.selectedKeys}
                        >
                            {this.renderTreeNodes(this.state.treeData)}
                        </Tree>

                    </div>
                    <Form layout={'inline'} style={{ padding: 10, flex: 1, backgroundColor: '#fff' }} >
                        <Row gutter={24}>
                            {
                                this.state.sonArrList.map((item, index) => {
                                    if (item.type === 'TextArea') {
                                        return (
                                            <Col span={item.span} key={index} style={{ paddingTop: 10 }}>
                                                <Form.Item label={item.label} key={item.paramName} className={item.className} style={item.styleLable}>
                                                    <Tooltip
                                                        trigger={['focus']}
                                                        title={item.title}
                                                        placement="topLeft"
                                                        overlayClassName="numeric-input"
                                                    >
                                                        {
                                                            getFieldDecorator(item.paramName, {
                                                                initialValue: item.initialValue ? item.initialValue : '',
                                                                rules: item.rules || null
                                                            })(

                                                                <TextArea
                                                                    style={item.style}
                                                                    placeholder={item.placeholder}
                                                                    // onChange={this.onChange}
                                                                    className={item.shuoming}
                                                                    rows={item.rows}
                                                                    maxLength={item.num}
                                                                    disabled={true} id={[item.paramName]}
                                                                    onChange={this.getChangeValueSon.bind(this, item.paramName)} size={config.size}
                                                                />

                                                            )
                                                        }
                                                    </Tooltip>
                                                </Form.Item>
                                            </Col>
                                        )
                                    } else if (item.type === 'select') {
                                        return (
                                            <Col span={item.span} key={index} style={{ paddingTop: 10 }}>
                                                <Form.Item label={item.label} key={item.paramName} className={item.className} style={item.styleLable}>
                                                    {
                                                        getFieldDecorator(item.paramName, {
                                                            initialValue: item.initialValue ? item.initialValue : (item.options[0] ? Util.numToString(item.options[0].value) : item.options[0]),
                                                            rules: item.rules || null
                                                        })(
                                                            <Select
                                                                size={config.size}
                                                                showSearch
                                                                mode={item.mode}
                                                                placeholder="Select a person"
                                                                style={{ width: item.width || 170 }}
                                                                optionFilterProp="children"
                                                                dropdownMatchSelectWidth={t.props.dropdownMatchSelectWidth}
                                                                onChange={t.selectedChange.bind(t, item.selectChange, item.nextParamName || false, item.paramName)}
                                                                onSelect={item.onSelect}
                                                                disabled={true}
                                                                style={item.style}
                                                                className={item.shuoming}
                                                            >
                                                                {
                                                                    item.options.map(option => {
                                                                        return (
                                                                            <Select.Option key={option.value}
                                                                                value={Util.numToString(option.value)}
                                                                            >
                                                                                {option.text}
                                                                            </Select.Option>

                                                                        )
                                                                    })
                                                                }
                                                            </Select>
                                                        )
                                                    }
                                                </Form.Item>
                                            </Col>
                                        )
                                    } else if (item.type === 'treeSelect') {
                                        return (
                                            <Col span={item.span} key={index} style={{ paddingTop: 10 }}>
                                                <Form.Item label={item.label} key={item.paramName} className={item.className} >
                                                    {
                                                        getFieldDecorator(item.paramName, {
                                                            initialValue: item.initialValue ? item.initialValue : null,
                                                            rules: item.rules || null
                                                        })(
                                                            <TreeSelect
                                                                treeData={item.treeData}
                                                                maxTagCount={5}
                                                                onChange={t.selectedChange.bind(t, item.selectChange, item.nextParamName || false, item.paramName)}
                                                                treeCheckable={item.treeCheckable}
                                                                showCheckedStrategy={SHOW_CHILD}
                                                                // searchPlaceholder={'请选部门'}
                                                                style={item.style}
                                                                className={item.shuoming}
                                                                disabled={true}
                                                            />
                                                        )
                                                    }
                                                </Form.Item>
                                            </Col>
                                        )
                                    }


                                })
                            }

                        </Row>

                    </Form>
                </div>




            </div>
        )
    }
}
export default Form.create()(CheckSubEvent);
